Skip to content

fix: carry a request id on every call, and match production's 10 MB ingest limit - #8

Merged
bwiz merged 1 commit into
mainfrom
fix/request-id-and-ingest-limit
Sep 29, 2026
Merged

bwiz merged 1 commit into
mainfrom
fix/request-id-and-ingest-limit

Conversation

@bwiz

@bwiz bwiz commented Sep 29, 2026 •

Copy link
Copy Markdown
Collaborator

Every request now sends its own x-request-id (a UUID per request). The id reported in errors, and by --verbose, is the body's requestId, else the response's x-request-id header, else the one the CLI sent. So every error carries an id, including a bare 413/502 from a proxy and network failures or timeouts. For those last two, the output says it is the CLI's own id and that the request may still have reached the API.

Requests also send User-Agent
"databox-cli/ (node ; )", so CLI usage and versions are visible in the API's request logs.

dataset ingest checked a 30,000,000-byte payload. Production enforces MaxPayloadSizeMb=10 on Content-Length: measured on 2026-09-29, 10,399,982 bytes passed the size check and 10,599,982 got 413 request_too_large. The CLI now refuses anything over 10 MiB (10,485,760 bytes) before sending.

Packaging:

  • npm pkg fix normalises the bin path and repository URL that npm corrected at publish.
  • npm audit fix (no --force) clears the two high advisories in runtime dependencies.
  • The version is 1.0.1, with a CHANGELOG entry, and the api-client rules describe the new headers and request-id resolution.

…ngest limit

Every request now sends its own x-request-id (a UUID per request). The
id reported in errors, and by --verbose, is the body's requestId, else
the response's x-request-id header, else the one the CLI sent. So every
error carries an id, including a bare 413/502 from a proxy and network
failures or timeouts. For those last two, the output says it is the
CLI's own id and that the request may still have reached the API.

Requests also send User-Agent
"databox-cli/<version> (node <v>; <platform>)", so CLI usage and
versions are visible in the API's request logs.

dataset ingest checked a 30,000,000-byte payload. Production enforces
MaxPayloadSizeMb=10 on Content-Length: measured on 2026-09-29,
10,399,982 bytes passed the size check and 10,599,982 got 413
request_too_large. The CLI now refuses anything over 10 MiB
(10,485,760 bytes) before sending.

Packaging:
- npm pkg fix normalises the bin path and repository URL that npm
  corrected at publish.
- npm audit fix (no --force) clears the two high advisories in runtime
  dependencies.
- The version is 1.0.1, with a CHANGELOG entry, and the api-client
  rules describe the new headers and request-id resolution.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@bwiz bwiz changed the title fix: carry a request id on every call, and match production's 10 MB i… fix: carry a request id on every call, and match production's 10 MB ingest limit Sep 29, 2026
@bwiz
bwiz merged commit be7d72d into main Sep 29, 2026
4 checks passed
@bwiz
bwiz deleted the fix/request-id-and-ingest-limit branch September 29, 2026 11:37
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