File tree Expand file tree Collapse file tree 2 files changed +10
-8
lines changed
background-charm-service/src Expand file tree Collapse file tree 2 files changed +10
-8
lines changed Original file line number Diff line number Diff line change @@ -6,8 +6,8 @@ import { SpaceManager } from "./space-manager.ts";
66import { useCancelGroup } from "@commontools/runner" ;
77
88export interface BackgroundCharmServiceOptions {
9- identity : Identity ,
10- toolshedUrl : string ,
9+ identity : Identity ;
10+ toolshedUrl : string ;
1111}
1212
1313export class BackgroundCharmService {
Original file line number Diff line number Diff line change @@ -75,9 +75,9 @@ export class WorkerController {
7575 // FIXME(ja): what should we do if the worker is erroring?
7676 // perhaps restart the worker?
7777 this . worker . onerror = ( err ) => {
78- log ( `${ this . did } : Worker error:` , err , {
79- error : true ,
80- } ) ;
78+ log ( `${ this . did } : Worker error:` , { error : true } , err ) ;
79+ // If not prevented, error is rethrown in this context.
80+ err . preventDefault ( ) ;
8181 } ;
8282 }
8383
@@ -87,9 +87,11 @@ export class WorkerController {
8787 toolshedUrl,
8888 rawIdentity : identity . serialize ( ) ,
8989 } ) . catch ( ( err ) => {
90- log ( `Worker controller ${ this . did } worker setup failed:` , err , {
91- error : true ,
92- } ) ;
90+ log (
91+ `Worker controller ${ this . did } worker setup failed:` ,
92+ { error : true } ,
93+ err ,
94+ ) ;
9395 } ) . then ( ( ) => {
9496 this . ready = true ;
9597 log ( `Worker controller ${ this . did } ready for work` ) ;
You can’t perform that action at this time.
0 commit comments