fix(api)!: each binary datapoint refusal has the type its status calls for - #120
Merged
Merged
Conversation
This was referenced Sep 17, 2026
…s for Every refusal on POST /timeseries/data/binary was datapoint-block-rejected, answering 400, 404, 413, 415, 422 or 429 depending on its reason. RFC 9457 gives a type one status, so each now has its own: invalid-frame, unknown-timeseries, value-type-mismatch, external-id-mismatch and too-many-in-flight, plus the existing request-too-large and unsupported-media-type. `reason` stays, which is what the Java and Rust SDKs match on. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Signed-off-by: jgjesdal <jostein@intellistream.ai>
JosteinGj
force-pushed
the
errors/9-binary-problem-types
branch
from
September 17, 2026 12:34
08fa7b0 to
b3412ec
Compare
This was referenced Sep 17, 2026
olavgg
approved these changes
Sep 17, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Every refusal on
POST /timeseries/data/binaryhad the typedatapoint-block-rejected, whether it answered 400, 404, 413, 415, 422 or 429. RFC 9457 §4 says a problem type documents the one status it is used with, so each status now gets its own type:reasonvaluesinvalid-frameunsorted,schema-mismatch, …)unknown-timeseriesunknown-timeseriesrequest-too-large(existing)frame-too-large,too-many-frames,request-too-largeunsupported-media-type(existing)unsupported-content-encodingvalue-type-mismatch/external-id-mismatchtoo-many-in-flighttoo-many-in-flightreason,frameIndex,timeseriesIdsand every status stay as they were.request-too-large, the type the size-limit filter already sends for an oversized body on this same endpoint. The 415 uses the same type as a wrongContent-Type.too-many-in-flightis explicitlyretry: same-requestinstead of being derived from the status.DatapointBlockProblemschema,ApiProblemlists the new types, and a test fails if any type constant inProblemsis missing from that list.Compatibility
This breaks anything matching
type == ".../datapoint-block-rejected". I found no code that does. The Java SDK (BinaryDatapointIngestor) and the Rust SDK (src/timeseries/binary.rs) check the status plus the substringunknown-timeseriesorexternal-id-mismatchin the body. Both strings are still inreason, and each is now also its type's slug.Docs (datahub-sdk-docs)
Updated in IntelliStream-DataHub/datahub-sdk-docs#80, to merge after this ships:
reference/binary-datapoints.md: §Responses (example, table with atypecolumn) and the §Caps row for the compressed body.reference/limits.md: summary table, §Request body size, §Binary frame caps. §Request body size already said a raw oversized body gotdatapoint-block-rejected; the filter has always sentrequest-too-large, so that is fixed there too.reference/client.md: the binary row of the status table.reference/timeseries.mdand the SDK-behaviour table inlimits.mduse onlyreasonstrings and stay true.Suggested doc pages for the new types, if type URIs are made to resolve:
invalid-frame,value-type-mismatch→binary-datapoints#responsesunknown-timeseries,external-id-mismatch→binary-datapoints#retryingtoo-many-in-flight→limits#binary-framesThis is one of four independent problem-type PRs (binary, file restore, file path collisions, upload 403). They merge cleanly with each other in any order.
./gradlew :datahub-api:testpasses.🤖 Generated with Claude Code