Skip to content

docs(reference): the Java client reads the problem document, and binary refusals have their own types - #95

Open
JosteinGj wants to merge 1 commit into
masterfrom
docs/java-sdk-problem-contract
Open

JosteinGj wants to merge 1 commit into
masterfrom
docs/java-sdk-problem-contract

Conversation

@JosteinGj

Copy link
Copy Markdown
Contributor

Two platform changes the reference had not caught up with. Both made existing pages wrong, which is worse than a missing page.

1. The Java SDK now parses the problem document

Pairs with IntelliStream-DataHub/datahub-platform#130.

client.md#problem-documents told Java readers "there is no typed accessor for its members yet, so read it with your own JSON parser". DatahubApiException.problem() now returns a Problem that is never null, so the Java tab gets the same treatment the Python and Rust tabs already had.

Java's ingest retry also changed: it follows the problem's retry member rather than the status, and honours Retry-After. That made two claims false:

  • "Java's ingest retries 429, 5xx and network failures with backoff and surfaces everything else"
  • "No client waits the Retry-After" — now true of Rust and Python only, so it is scoped to them.

Rust and Python claims are untouched. Neither client changed, and neither was verified here.

2. datapoint-block-rejected no longer exists

Platform b3412ec0 (errors/9) gave each binary refusal the type its status calls for: invalid-frame, unknown-timeseries, request-too-large, value-type-mismatch, external-id-mismatch, too-many-in-flight, unsupported-media-type. reason was deliberately kept as the sub-code, so every table keyed by reason stays correct; only the type claims were wrong. That was never documented, and it left 5 stale references across 3 pages.

Files

Page What
client.md Java tab rewritten with Problem; retry-is-advisory and the not-a-problem-document caution reconciled with Java's never-null problem(); retryable table row and the Java retry paragraph corrected
limits.md Summary table, request-body-size and binary-frame-caps intros retyped; #sdk-behaviour table and prose split Java from Rust/Python
binary-datapoints.md #responses intro, JSON example and a new type column; #retrying narrowed from 5xx to 502/503/504

Verification

npm run build compiles clean (zero warnings, no broken links or anchors). No em-dashes added; zero datapoint-block-rejected left in docs/.

Found, not fixed

  1. resources.md:1007 breaks npm run build on master today — the heading is indented two spaces, so MDX parses {#client-coverage} as a JS expression. Pre-existing, from the docs(java-sdk): the Java client now reaches every endpoint but two #94 merge. One-line fix (delete the indent), left out to keep this diff scoped.
  2. Four places still describe the old status-only Java retry rule: timeseries.md:557, :584, :770 and guides/ingest-timeseries.mdx:154.
  3. AGENTS.md says system Node is 18 and documents a standalone-Node workaround; it is 22.22.2 on this host and the workaround was not needed.

🤖 Generated with Claude Code

…ry refusals have their own types

Two platform changes the reference had not caught up with.

The Java SDK exposed only the raw body, so #problem-documents told Java
readers to parse it themselves. DatahubApiException.problem() now returns
a Problem (never null), and ingest follows the retry member rather than
the status, honouring Retry-After. Platform branch sdk/problem-contract.

Separately, datapoint-block-rejected no longer exists: each binary refusal
carries the type its status calls for (invalid-frame, unknown-timeseries,
request-too-large, value-type-mismatch, external-id-mismatch,
too-many-in-flight, unsupported-media-type), with reason kept as the
sub-code. That landed in platform b3412ec0 and was never documented.

Rust and Python claims are unchanged: neither client changed.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Signed-off-by: jgjesdal <jostein@intellistream.ai>
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.

1 participant