Skip to content

fix(pbs): return Builder API JSON ErrorMessage instead of plain text#482

Open
JasonVranek wants to merge 1 commit into
pr/get-header-always-sszfrom
pr/json-error-responses
Open

fix(pbs): return Builder API JSON ErrorMessage instead of plain text#482
JasonVranek wants to merge 1 commit into
pr/get-header-always-sszfrom
pr/json-error-responses

Conversation

@JasonVranek

Copy link
Copy Markdown
Collaborator

PBS returned error responses to the beacon node as plain text, but the Builder API defines errors as the JSON ErrorMessage schema.

closes OffchainLabs/prysm/issues/17136

PBS returned error responses to the beacon node as plain text, but the
Builder
API defines errors as the JSON ErrorMessage schema ({code, message},
application/json), so a client (e.g. an SSZ-first beacon node deciding
whether to
retry as JSON) could not parse them. Encode PbsClientError as JSON with
the HTTP
status as code; this covers every application-level error from all
routes,
including getHeader and submitBlock. Errors are always JSON per spec,
never SSZ.
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