Skip to content

one_d4: a request body that is not JSON, or the wrong shape, is a 400 - #1480

Merged
aaylward merged 1 commit into
mainfrom
one-d4-bad-json
Sep 2, 2026
Merged

one_d4: a request body that is not JSON, or the wrong shape, is a 400#1480
aaylward merged 1 commit into
mainfrom
one-d4-bad-json

Conversation

@aaylward

@aaylward aaylward commented Sep 2, 2026

Copy link
Copy Markdown
Collaborator

Closes #1472. A body that isn't JSON, or is JSON of the wrong shape (a string where a number goes), came back as a 500 with a stack trace and a Sentry event per client typo. Both now answer 400 in the same {"error": …} envelope as a bad query, with a fixed message rather than the parser's byte offsets. Pinned at the wire in QueryErrorWireTest; bazel test //domains/games/apis/one_d4/... passes.

Micronaut's JsonSyntaxException and Jackson's DatabindException reach the
error handler and answer in the same error envelope as a bad query, with
a fixed message rather than the parser's byte offsets. Pinned at the wire.
@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
1d4-web 4e5f031 Commit Preview URL

Branch Preview URL
Sep 02 2026, 04:20 PM

@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
ast-lol 4e5f031 Commit Preview URL

Branch Preview URL
Sep 02 2026, 04:26 PM

@aaylward
aaylward merged commit 4038fd2 into main Sep 2, 2026
21 of 22 checks passed
@aaylward
aaylward deleted the one-d4-bad-json branch September 2, 2026 16:52
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.

one_d4: malformed JSON body answers 500, not 400

1 participant