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

Add a handler for AxiosError errors #189

Merged
merged 2 commits into from
Apr 17, 2023
Merged

Add a handler for AxiosError errors #189

merged 2 commits into from
Apr 17, 2023

Conversation

j-f1
Copy link
Contributor

@j-f1 j-f1 commented Apr 16, 2023

This will help debug more clearly when Nordigen’s API returns unexpected status codes, since the current shape causes the actual response data to be collapsed in the console logs.

@@ -199,6 +200,16 @@ app.post(
error_code: 'NORDIGEN_ERROR',
});
break;
case isAxiosError(error):
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fun fact! This doesn’t actually narrow the error type away from any. Maybe microsoft/TypeScript#53681 will fix that?

@trafico-bot trafico-bot bot added ✅ Approved Pull Request has been approved and can be merged and removed 🔍 Ready for Review labels Apr 17, 2023
@j-f1 j-f1 merged commit 652d75a into master Apr 17, 2023
@j-f1 j-f1 deleted the jed/axios-error branch April 17, 2023 19:54
@trafico-bot trafico-bot bot added ✨ Merged Pull Request has been merged successfully and removed ✅ Approved Pull Request has been approved and can be merged labels Apr 17, 2023
MMichotte pushed a commit to MMichotte/actual-server that referenced this pull request Sep 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
✨ Merged Pull Request has been merged successfully
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants