Class to format the exception when an error is return
Functions
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:
Name | Type | Default value | Description |
---|---|---|---|
status_code | int | ||
code | str | ||
detail | str | ||
instance_id | str | ||
show_as | Literal | error | |
headers | Dict |
Parameters:
Name | Type | Default value | Description |
---|---|---|---|
key | str | ||
path | str | / | |
domain | str | None | ||
secure | bool | False | |
httponly | bool | False | |
samesite | Literal['lax', 'strict', 'none'] | None | lax |
Return type:
dict |
Parameters:
Name | Type | Default value | Description |
---|---|---|---|
headers | Mapping[str, str] | None |
Parameters:
Name | Type | Default value | Description |
---|---|---|---|
content | Any |
Return type:
bytes |
Parameters:
Name | Type | Default value | Description |
---|---|---|---|
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 |