Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(core): Improve axios error handling in nodes #5664

Closed
wants to merge 2 commits into from

Conversation

netroy
Copy link
Member

@netroy netroy commented Mar 10, 2023

No description provided.

@netroy netroy requested a review from agobrech March 10, 2023 10:57
@github-actions
Copy link
Contributor

Great PR! Please pay attention to the following items before merging:

Files matching packages/**:

  • If fixing bug, added test to cover scenario.
  • If addressing forum or Github issue, added link to description.

Files matching packages/**/*.ts:

  • Added unit tests to cover new or updated functionality.

Files matching packages/nodes-base/nodes/**:

  • Added workflow tests for nodes if possible.

Make sure to check off this list before asking for review.

@n8n-assistant n8n-assistant bot added core Enhancement outside /nodes-base and /editor-ui n8n team Authored by the n8n team node/improvement New feature or request labels Mar 10, 2023

constructor(
node: INode,
error: JsonObject,
{ message, description, httpCode, parseXml, runIndex, itemIndex }: NodeApiErrorOptions = {},
) {
if (error.reason instanceof NodeApiError) return error.reason;
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this should be a separate PR. The issue this is solving is of us accidentally wrapping NodeApiError instances with new NodeApiError. This is what causes a lot of the "Unknown error" in the frontend.

@netroy
Copy link
Member Author

netroy commented Mar 16, 2023

closing in favor of #5699 & #5701

@netroy netroy closed this Mar 16, 2023
@netroy netroy deleted the fix-error-handling branch March 16, 2023 10:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core Enhancement outside /nodes-base and /editor-ui n8n team Authored by the n8n team node/improvement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant