ExceptionHandler
Class to handle exceptions and return a formatted object to the front
Functions
Return type:
str |
Generate a unique exception code from the stack trace
Return type:
str |
Convert the code to a unique code by adding the brick name before the code
Parameters:
Name | Type | Default value | Description |
---|---|---|---|
code | str | Exception code |
Return type:
str |
Parameters:
Name | Type | Default value | Description |
---|---|---|---|
request | Request | ||
exception | Exception |
Return type:
ExceptionResponse |
Handle a RequestValidationError exception (error 422 Unprocessable Entity) It returns only the first message
Parameters:
Name | Type | Default value | Description |
---|---|---|---|
exc | RequestValidationError |
Return type:
str |