10 lines
570 B
TypeScript
10 lines
570 B
TypeScript
import { BaseEntityDict } from "oak-domain";
|
|
import { AsyncContext } from "oak-domain/lib/store/AsyncRowStore";
|
|
import { EntityDict } from "oak-domain/lib/types";
|
|
export type InternalErrorType = 'aspect' | 'trigger' | 'watcher' | 'timer' | 'checkpoint';
|
|
export type InternalErrorHandler<ED extends EntityDict & BaseEntityDict, Cxt extends AsyncContext<ED>> = {
|
|
name: string;
|
|
handle: (ctx: Cxt, type: InternalErrorType, message: string, err: Error) => Promise<void>;
|
|
};
|
|
export type ExceptionPublisher = (type: string, message: string, err: any) => Promise<void>;
|