event decarotor checked & event 2 endpoint dynmc create is tested
This commit is contained in:
@@ -17,18 +17,15 @@ class HTTPExceptionApiHandler:
|
||||
|
||||
@staticmethod
|
||||
def retrieve_error_status_code(exc: HTTPExceptionApi) -> int:
|
||||
from ErrorHandlers import DEFAULT_ERROR
|
||||
|
||||
error_by_codes = BaseErrorModelClass.retrieve_error_by_codes()
|
||||
grab_status_code = error_by_codes.get(
|
||||
str(exc.error_code).upper(), DEFAULT_ERROR
|
||||
str(exc.error_code).upper(), 500
|
||||
)
|
||||
return int(grab_status_code)
|
||||
|
||||
@staticmethod
|
||||
def retrieve_error_message(exc: HTTPExceptionApi, error_languages) -> str:
|
||||
from ErrorHandlers import DEFAULT_ERROR
|
||||
|
||||
return error_languages.get(str(exc.error_code).upper(), DEFAULT_ERROR)
|
||||
|
||||
async def handle_exception(
|
||||
|
||||
Reference in New Issue
Block a user