Back to bricks list
Introduction Version

ExceptionResponse

Class to format the exception when an error is return

Functions

__INIT__

Arguments: status_code {int} -- HTTP Status code {str} -- Custom unique code detail {str} -- Detail of the error instance_id {str} -- Unique instance id of this instance of error

Parameters:
NameTypeDefault valueDescription
status_codeint
codestr
detailstr
instance_idstr
show_asLiteral error
headersDict
GET_JSON_BODY
Return type:
dict
INIT_HEADERS
Parameters:
NameTypeDefault valueDescription
headersMapping[str, str] | None
RENDER
Parameters:
NameTypeDefault valueDescription
contentAny
Return type:
bytes