-
Notifications
You must be signed in to change notification settings - Fork 72
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
feat: add headers to http error responses #1019
Conversation
feat: add headers to http error responses
I am not super familiar with this repo, and this is my first contribution here. Please take a bit more time and review the code. Happy to make any changes you callout. The basic idea of this change is to include a headers object in the HttpError thrown by influx. There are multiple different "types" of header formats, I chose to boil them down to the internal format which is basically just a simple |
Codecov ReportAll modified and coverable lines are covered by tests ✅
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. Additional details and impacted files@@ Coverage Diff @@
## master #1019 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 35 35
Lines 1448 1449 +1
Branches 344 344
=========================================
+ Hits 1448 1449 +1 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for your PR! 👍 Before we can proceed with accepting it, there are a few requirements that need to be met:
… and changed typed to remove undefined check
feat: add headers to http error responses feat: updates per code review to use internal headers getter function and changed typed to remove undefined check
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@twosdai, thank you again for your fantastic PR! 👍
Could you please update the CHANGELOG.md
with the following entry:
### Features
1. [1019](https://github.com/influxdata/influxdb-client-js/pull/1019/): Propagates headers from HTTP response when an error is returned from the server.
Once that's done, we'll be ready to merge this PR.
…influxdb-client-js into feat/http-error-headers
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 🚀
Fixes #1018
Proposed Changes
Adds headers to the HTTP error response.
Checklist
yarn test
completes successfully