mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-18 02:21:13 +00:00
feat(API): Report unhandled app crashes to Sentry (#4548)
* SIGTERM/SIGINT should only be handled once * move error-handling initialization to commands * create a new `sleep` function in workflow utils * detect crashes and report them to Sentry
This commit is contained in:
committed by
GitHub
parent
5d852f9230
commit
2425c10b2b
@@ -13,6 +13,7 @@ import {
|
||||
INodeExecutionData,
|
||||
NodeApiError,
|
||||
NodeOperationError,
|
||||
sleep,
|
||||
} from 'n8n-workflow';
|
||||
|
||||
export async function twitterApiRequest(
|
||||
@@ -193,12 +194,7 @@ export async function uploadAttachments(
|
||||
// data has not been uploaded yet, so wait for it to be ready
|
||||
if (response.processing_info) {
|
||||
const { check_after_secs } = response.processing_info as IDataObject;
|
||||
await new Promise((resolve, _reject) => {
|
||||
setTimeout(() => {
|
||||
// @ts-ignore
|
||||
resolve();
|
||||
}, (check_after_secs as number) * 1000);
|
||||
});
|
||||
await sleep((check_after_secs as number) * 1000);
|
||||
}
|
||||
|
||||
media.push(response);
|
||||
|
||||
Reference in New Issue
Block a user