repositories / pi-ext

pi-ext

bugabingas pi extensions

owned by bugabinga

fix(good-job): avoid terminal-corrupting diagnostics

0edf562e907ac15a7922b2c34ca5062096c4e9de

Oliver Jan Krylow <oliver@bugabinga.net> ·

SSH signature · not checked

Browse filesCompare with HEAD

Changed files (1)

extensions/good-job/implementation.ts

Modified
456 456 } catch (error) {
457 457 if (controller.signal.aborted || generation !== this.generation) return;
458 + let message = `good-job failed: ${boundedError(error)}`;
459 460 await commitFailure(job, error, claimPath, this.paths);
460 461 this.snapshots.delete(job.id);
461 462 } catch (storageError) {
462 - console.error("[good-job] could not persist failure", storageError);
463 + message += `; could not persist failure: ${boundedError(storageError)}`;
464 - ctx.ui?.notify(`good-job failed: ${boundedError(error)}`, "error");
465 + ctx.ui?.notify(message, "error");
465 466 } finally {
466 467 if (this.activeController === controller)
467 468 this.activeController = undefined;