Documents injecute 1.x · Migrating from 0.x
Skip to content

Interface: LifecycleErrorContext ​

Defined in: src/utils/lifecycle.ts:122

Where a failure reported to onError happened.

Example ​

ts
await startLifecycle(app, {
  onError: (error, { key, during }: LifecycleErrorContext) => logger.warn({ error, key, during }),
});

Properties ​

during ​

readonly during: "dispose" | "start" | "rollback"

Defined in: src/utils/lifecycle.ts:129

start: another hook of a concurrent stage failed too; rollback: an undo function failed while undoing a failed start; dispose: the container failed to dispose after a failed start.


key? ​

readonly optional key?: ServiceKey

Defined in: src/utils/lifecycle.ts:124

The hook the failure belongs to; missing for dispose.

Released under the MIT License.