mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 18:12:04 +00:00
refactor(core): Separate API response from error in execution error causes (no-changelog) (#7880)
Store the third-party API response error separately from the error stored as `cause` Follow-up to: https://github.com/n8n-io/n8n/pull/7820#discussion_r1406009154
This commit is contained in:
@@ -196,7 +196,12 @@ export class MailchimpTrigger implements INodeType {
|
||||
try {
|
||||
await mailchimpApiRequest.call(this, endpoint, 'GET');
|
||||
} catch (error) {
|
||||
if (error instanceof NodeApiError && error.cause && 'isAxiosError' in error.cause) {
|
||||
if (
|
||||
error instanceof NodeApiError &&
|
||||
error.cause &&
|
||||
'isAxiosError' in error.cause &&
|
||||
'statusCode' in error.cause
|
||||
) {
|
||||
if (error.cause.statusCode === 404) {
|
||||
return false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user