event decarotor checked & event 2 endpoint dynmc create is tested

This commit is contained in:
2025-01-15 23:40:55 +03:00
parent 76d286b519
commit 049a7c1e11
12 changed files with 369 additions and 173 deletions

View File

@@ -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(