mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 10:02:05 +00:00
fix(core): Deduplicate error handling in nodes (#4319)
* Fix issue with isAxios property * 🥅 Deduplicate errors handeling improve errors for credentials * 🎨 correctly throws error
This commit is contained in:
@@ -7,6 +7,7 @@ import {
|
||||
IWebhookFunctions,
|
||||
} from 'n8n-core';
|
||||
|
||||
|
||||
import { IHttpRequestOptions, NodeApiError } from 'n8n-workflow';
|
||||
|
||||
export async function awsApiRequest(
|
||||
@@ -31,11 +32,7 @@ export async function awsApiRequest(
|
||||
headers,
|
||||
region: credentials?.region as string,
|
||||
} as IHttpRequestOptions;
|
||||
try {
|
||||
return await this.helpers.requestWithAuthentication.call(this, 'aws', requestOptions);
|
||||
} catch (error) {
|
||||
throw new NodeApiError(this.getNode(), error); // no XML parsing needed
|
||||
}
|
||||
return await this.helpers.requestWithAuthentication.call(this, 'aws', requestOptions);
|
||||
}
|
||||
|
||||
export async function awsApiRequestREST(
|
||||
|
||||
Reference in New Issue
Block a user