1
1
mirror of https://github.com/n8n-io/n8n.git synced 2024-09-11 21:17:50 +03:00

🐛 Add back await that error can get caught

This commit is contained in:
Jan Oberhauser 2019-10-05 13:44:25 +02:00
parent 82d0c8deeb
commit 789f064ed0
2 changed files with 2 additions and 2 deletions

View File

@ -153,7 +153,7 @@ export async function apiRequest(this: IHookFunctions | IExecuteFunctions | ILoa
};
try {
return this.helpers.request!(options);
return await this.helpers.request!(options);
} catch (error) {
if (error.statusCode === 401) {
// Return a clear error

View File

@ -39,7 +39,7 @@ export async function twilioApiRequest(this: IHookFunctions | IExecuteFunctions,
};
try {
return this.helpers.request(options);
return await this.helpers.request(options);
} catch (error) {
if (error.statusCode === 401) {
// Return a clear error