Repository navigation
feat(api): cap request body at 10 MB with CKAN 413 envelope - #33
Merged
Merged
Conversation
BigQuery's `jobs.insert` request body is hard-capped at 10 MB, so a
`datastore_create` / `datastore_upsert` whose records (shipped as a
single `@rows` STRING query parameter) overflow that cap fails deep
in the engine with a raw HTML 413 and surfaces as a 500. Lower the
default `MAX_REQUEST_BODY_MB` from 50 to 10 so the middleware catches
oversize writes at the boundary, and rewrite its 413 to emit the CKAN
error envelope (`{help, success, error}`) with an actionable message
naming the actual body size and the configured limit.
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars.
|
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.
BigQuery's
jobs.insertrequest body is hard-capped at 10 MB, so adatastore_create/datastore_upsertwhose records (shipped as a single@rowsSTRING query parameter) overflow that cap fails deep in the engine with a raw HTML 413 and surfaces as a 500. Lower the defaultMAX_REQUEST_BODY_MBfrom 50 to 10 so the middleware catches oversize writes at the boundary, and rewrite its 413 to emit the CKAN error envelope ({help, success, error}) with an actionable message naming the actual body size and the configured limit.