Skip to main content

Module response

Module response 

Source
Expand description

Reusable JSON response envelope and error-body helpers.

Functionsยง

application_error_status
Map a Soma ApplicationError.code value to the HTTP status it renders as.
json_rejection_response
Render a JSON body extraction failure as a response.
json_response
Render any Serialize payload as a JSON response with the given status.
validation_error_response
Render a 400 Bad Request with a generic validation error body.