feat: Capture unhandled errors by restructuring apps

This commit is contained in:
Faruk AYDIN
2022-10-21 19:03:24 +02:00
parent 525472d3e0
commit 9a743fb4a8
16 changed files with 92 additions and 76 deletions

View File

@@ -213,7 +213,8 @@ export interface ITrigger {
dedupeStrategy?: 'greatest' | 'unique' | 'last';
substeps: ISubstep[];
getInterval?(parameters: IGlobalVariable['step']['parameters']): string;
run($: IGlobalVariable): Promise<ITriggerOutput>;
run($: IGlobalVariable): Promise<void | ITriggerOutput>;
sort?($: IGlobalVariable): void | ITriggerOutput;
}
export interface IActionOutput {
@@ -279,11 +280,15 @@ export type IGlobalVariable = {
id: string;
testRun: boolean;
};
output: {
data: ITriggerDataItem[];
error?: IJSONObject;
}
process?: (triggerDataItem: ITriggerDataItem) => Promise<void>;
};
declare module 'axios' {
interface AxiosResponse {
integrationError?: IJSONObject;
httpError?: IJSONObject;
}
}