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. |
bednar
left a comment
There was a problem hiding this comment.
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
bednar
left a comment
There was a problem hiding this comment.
@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
Fixes #1018
Proposed Changes
Adds headers to the HTTP error response.
Checklist
yarn testcompletes successfully