gws_core

Introduction
Getting Started
Developer guide
Release
Architecture
CLI
Technical documentations
Version

ExceptionHandler

Class to handle exceptions and return a formatted object to the front

Functions
generate_instance_id @classmethod
Return type : str
generate_unique_code_from_exception @classmethod

Generate a unique exception code from the stack trace

Return type : str
get_unique_code_for_brick @classmethod

Convert the code to a unique code by adding the brick name before the code

code : str
exception code
Return type : str
handle_exception @classmethod
request : Request
exception : Exception
Return type : ExceptionResponse
handle_request_validation_error @classmethod

Handle a RequestValidationError exception (error 422 Unprocessable Entity) It returns only the first message

exc : RequestValidationError
unique_code_separator @classmethod
Return type : str