Closed twosdai closed 3 months ago
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 Record<string, string>
This means that for the browser client we need to go over each header value and map it into a object and then pass it in. Since the default Headers
from the response object will cause typescript to error out at compile time.
:warning: Please install the to ensure uploads and comments are reliably processed by Codecov.
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 100.00%. Comparing base (
e65b8fb
) to head (70a8805
).
:exclamation: Your organization needs to install the Codecov GitHub app to enable full functionality.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
@bednar Thanks for the comments, I've implemented the change here: https://github.com/influxdata/influxdb-client-js/pull/1019/commits/c3fb1fa341485af87aff9439277eb6bc91fa456f
Let me know if you need / want anything else.
@bednar See the commit here for the changelog update: https://github.com/influxdata/influxdb-client-js/pull/1019/commits/643e6f433d2237d2ec9fe278db1708f0cef7a84f
Let me know if you need anything else! Thanks for the quick review :)
Fixes https://github.com/influxdata/influxdb-client-js/issues/1018
Proposed Changes
Adds headers to the HTTP error response.
Checklist
yarn test
completes successfully