Skip to content

Conversation

@karel-rehor
Copy link
Contributor

@karel-rehor karel-rehor commented Aug 1, 2024

Proposed Changes

Http Headers are already part of InfluxException. In the WriteApi they can be accessed with an EventListener. With WriteApiBlocking they get thrown in write method calls.

  • print selected headers useful for debugging to error logs
  • add an example of working with headers from InfluxException

Note that Cloud v3 and OSS v2 handle exceptional streamed or batched data on the server side a little bit differently. It appears that with v3 cloud batches of data that include some invalid records along with valid ones, will still write the valid records and return a success HTTP status code. OSS v2 on the other hand returns an error status triggering an exception.

Checklist

  • CHANGELOG.md updated
  • Rebased/mergeable
  • A test has been added if appropriate
  • mvn test completes successfully
  • Commit messages are conventional
  • Sign CLA (if not already signed)

@karel-rehor karel-rehor requested review from alespour and bednar August 1, 2024 11:53
@codecov-commenter
Copy link

codecov-commenter commented Aug 1, 2024

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

Attention: Patch coverage is 77.77778% with 2 lines in your changes missing coverage. Please review.

Project coverage is 88.50%. Comparing base (7b39e0c) to head (3824efe).
Report is 9 commits behind head on master.

Files Patch % Lines
.../influxdb/client/write/events/WriteErrorEvent.java 77.77% 1 Missing and 1 partial ⚠️

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@             Coverage Diff              @@
##             master     #745      +/-   ##
============================================
- Coverage     88.51%   88.50%   -0.02%     
+ Complexity      786      785       -1     
============================================
  Files           174      174              
  Lines          7195     7203       +8     
  Branches        405      405              
============================================
+ Hits           6369     6375       +6     
- Misses          696      697       +1     
- Partials        130      131       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@karel-rehor karel-rehor marked this pull request as draft August 5, 2024 08:06
Copy link
Contributor

@bednar bednar left a comment

Choose a reason for hiding this comment

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

LGTM 🚀

@karel-rehor karel-rehor marked this pull request as ready for review August 5, 2024 14:25
@karel-rehor karel-rehor merged commit 9ab894c into master Aug 6, 2024
@karel-rehor karel-rehor deleted the feat/httpErrorHeaders branch August 6, 2024 15:13
@bednar bednar added this to the 7.2.0 milestone Aug 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants