Skip to content

chore: backport v2 write API error response format fix - #26787

Merged
hiltontj merged 1 commit into
mainfrom
backport-pr-1294
Sep 10, 2025
Merged

chore: backport v2 write API error response format fix#26787
hiltontj merged 1 commit into
mainfrom
backport-pr-1294

Conversation

@hiltontj

@hiltontj hiltontj commented Sep 10, 2025

Copy link
Copy Markdown
Contributor

Summary

Changes

  • Added V2WriteApiError wrapper type to format errors according to v2 API specification
  • Updated error handling in API_V2_WRITE route to use new error format
  • Error responses now return JSON with {"code": "...", "message": "..."} structure

@hiltontj hiltontj self-assigned this Sep 10, 2025
@hiltontj hiltontj added the v3 label Sep 10, 2025
@hiltontj
hiltontj requested a review from a team September 10, 2025 18:23
@hiltontj
hiltontj marked this pull request as draft September 10, 2025 18:24
@hiltontj

Copy link
Copy Markdown
Contributor Author

Ah, sorry @pauldix Claude missed porting over the tests 🤦 I am prodding it to do that now.

Backports changes from influxdb_pro PR #1294 to make the /v2/write API
error responses conform to the documented schema with {"code": "...", "message": "..."}
format instead of the previous non-standard error format.

This ensures backward compatibility with existing clients expecting the v2 API
error format.

Ref: influxdata/influxdb_pro#1294

test: add tests for v2 write API error response format

Adds comprehensive tests to verify the /v2/write API error responses
conform to the documented JSON schema with {"code": "...", "message": "..."}
format.

Tests cover:
- Invalid line protocol syntax errors
- Missing parameter validation errors
- Schema conflict errors
- Empty body errors
- Malformed line protocol errors
- Success responses (ensuring no error format is used)

These tests were backported from influxdb_pro PR #1294
@hiltontj
hiltontj marked this pull request as ready for review September 10, 2025 18:36
@hiltontj

Copy link
Copy Markdown
Contributor Author

Okay, I am going to merge, since the only addition since approval was the tests, as-is, from the enterprise PR.

@hiltontj
hiltontj merged commit 4b3dbda into main Sep 10, 2025
6 checks passed
@hiltontj
hiltontj deleted the backport-pr-1294 branch September 10, 2025 18:37
hiltontj added a commit that referenced this pull request Sep 11, 2025
Backports changes from influxdb_pro PR #1294 to make the /v2/write API
error responses conform to the documented schema with {"code": "...", "message": "..."}
format instead of the previous non-standard error format.

This ensures backward compatibility with existing clients expecting the v2 API
error format.

Ref: influxdata/influxdb_pro#1294

test: add tests for v2 write API error response format

Adds comprehensive tests to verify the /v2/write API error responses
conform to the documented JSON schema with {"code": "...", "message": "..."}
format.

Tests cover:
- Invalid line protocol syntax errors
- Missing parameter validation errors
- Schema conflict errors
- Empty body errors
- Malformed line protocol errors
- Success responses (ensuring no error format is used)

These tests were backported from influxdb_pro PR #1294
hiltontj added a commit that referenced this pull request Sep 11, 2025
Backports changes from influxdb_pro PR #1294 to make the /v2/write API
error responses conform to the documented schema with {"code": "...", "message": "..."}
format instead of the previous non-standard error format.

This ensures backward compatibility with existing clients expecting the v2 API
error format.

Ref: influxdata/influxdb_pro#1294

test: add tests for v2 write API error response format

Adds comprehensive tests to verify the /v2/write API error responses
conform to the documented JSON schema with {"code": "...", "message": "..."}
format.

Tests cover:
- Invalid line protocol syntax errors
- Missing parameter validation errors
- Schema conflict errors
- Empty body errors
- Malformed line protocol errors
- Success responses (ensuring no error format is used)

These tests were backported from influxdb_pro PR #1294
hiltontj added a commit that referenced this pull request Sep 11, 2025
Backports changes from influxdb_pro PR #1294 to make the /v2/write API
error responses conform to the documented schema with {"code": "...", "message": "..."}
format instead of the previous non-standard error format.

This ensures backward compatibility with existing clients expecting the v2 API
error format.

Ref: influxdata/influxdb_pro#1294

test: add tests for v2 write API error response format

Adds comprehensive tests to verify the /v2/write API error responses
conform to the documented JSON schema with {"code": "...", "message": "..."}
format.

Tests cover:
- Invalid line protocol syntax errors
- Missing parameter validation errors
- Schema conflict errors
- Empty body errors
- Malformed line protocol errors
- Success responses (ensuring no error format is used)

These tests were backported from influxdb_pro PR #1294
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants