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
status_code :
int
code :
str
detail :
str
instance_id :
str
show_as :
Literal
- error
headers :
Dict
delete_cookie
key :
str
path :
str
- /
domain :
str | None
secure :
bool
- False
httponly :
bool
- False
samesite :
Literal['lax', 'strict', 'none'] | None
- lax
get_json_body
Return type :
dict
init_headers
headers :
Mapping[str, str] | None
render
content :
Any
Return type :
bytes
set_cookie
key :
str
value :
str
- ''
max_age :
int | None
expires :
datetime | str | int | None
path :
str
- /
domain :
str | None
secure :
bool
- False
httponly :
bool
- False
samesite :
Literal['lax', 'strict', 'none'] | None
- lax