Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions background-charm-service/src/service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import { SpaceManager } from "./space-manager.ts";
import { useCancelGroup } from "@commontools/runner";

export interface BackgroundCharmServiceOptions {
identity: Identity,
toolshedUrl: string,
identity: Identity;
toolshedUrl: string;
}

export class BackgroundCharmService {
Expand Down
14 changes: 8 additions & 6 deletions background-charm-service/src/worker-controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,9 @@ export class WorkerController {
// FIXME(ja): what should we do if the worker is erroring?
// perhaps restart the worker?
this.worker.onerror = (err) => {
log(`${this.did}: Worker error:`, err, {
error: true,
});
log(`${this.did}: Worker error:`, { error: true }, err);
// If not prevented, error is rethrown in this context.
err.preventDefault();
};
}

Expand All @@ -87,9 +87,11 @@ export class WorkerController {
toolshedUrl,
rawIdentity: identity.serialize(),
}).catch((err) => {
log(`Worker controller ${this.did} worker setup failed:`, err, {
error: true,
});
log(
`Worker controller ${this.did} worker setup failed:`,
{ error: true },
err,
);
}).then(() => {
this.ready = true;
log(`Worker controller ${this.did} ready for work`);
Expand Down