Adds Exception Handlers

This commit is contained in:
2024-05-21 19:23:49 -03:00
parent 458d63a6c5
commit 0acf167d12
5 changed files with 48 additions and 2 deletions

View File

@@ -4,5 +4,5 @@ from fastapi import HTTPException, status
class FileNotFoundException(HTTPException):
def __init__(self, message: str):
super().__init__(
status.HTTP_400_BAD_REQUEST, detail=message
status.HTTP_404_NOT_FOUND, detail=message
)