mirror of
https://github.com/n8n-io/n8n.git
synced 2025-02-21 02:56:40 -08:00
🐛 Add back await that error can get caught
This commit is contained in:
parent
82d0c8deeb
commit
789f064ed0
|
@ -153,7 +153,7 @@ export async function apiRequest(this: IHookFunctions | IExecuteFunctions | ILoa
|
||||||
};
|
};
|
||||||
|
|
||||||
try {
|
try {
|
||||||
return this.helpers.request!(options);
|
return await this.helpers.request!(options);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
if (error.statusCode === 401) {
|
if (error.statusCode === 401) {
|
||||||
// Return a clear error
|
// Return a clear error
|
||||||
|
|
|
@ -39,7 +39,7 @@ export async function twilioApiRequest(this: IHookFunctions | IExecuteFunctions,
|
||||||
};
|
};
|
||||||
|
|
||||||
try {
|
try {
|
||||||
return this.helpers.request(options);
|
return await this.helpers.request(options);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
if (error.statusCode === 401) {
|
if (error.statusCode === 401) {
|
||||||
// Return a clear error
|
// Return a clear error
|
||||||
|
|
Loading…
Reference in a new issue