Problem
handleWriteError in src/services/write.service.ts throws hardcoded error messages for 400/401/403/413/422 status codes, discarding the actual InfluxDB error detail from the response body.
For example, Core returns detailed 400 errors for bad writes:
{"error":"partial write of line protocol occurred","data":[{"error_message":"No fields were provided","line_number":1}]}
But the handler throws only:
Bad request: Invalid line protocol format or parameters
The real error detail (which lines failed, why) is lost.
Expected behavior
The server error message should be surfaced in the thrown error, matching the pattern used in handleQueryError and the other service error handlers:
const serverMessage =
error.response?.data?.message ||
error.response?.data?.error ||
(typeof error.response?.data === "string" ? error.response.data : null) ||
error.response?.statusText;
Affected code
src/services/write.service.ts lines 194-213 (handleWriteError)
Context
Found during error handling audit in PR #31. The other 4 services have been fixed to surface all error formats (JSON {error:...}, JSON {message:...}, plain-text strings).
Problem
handleWriteErrorinsrc/services/write.service.tsthrows hardcoded error messages for 400/401/403/413/422 status codes, discarding the actual InfluxDB error detail from the response body.For example, Core returns detailed 400 errors for bad writes:
{"error":"partial write of line protocol occurred","data":[{"error_message":"No fields were provided","line_number":1}]}But the handler throws only:
The real error detail (which lines failed, why) is lost.
Expected behavior
The server error message should be surfaced in the thrown error, matching the pattern used in
handleQueryErrorand the other service error handlers:Affected code
src/services/write.service.tslines 194-213 (handleWriteError)Context
Found during error handling audit in PR #31. The other 4 services have been fixed to surface all error formats (JSON
{error:...}, JSON{message:...}, plain-text strings).