From 4a97789c1afb5bc7ddbf456df0d99fb923074a3b Mon Sep 17 00:00:00 2001 From: luxferre Date: Fri, 29 May 2026 09:47:37 +0100 Subject: [PATCH] minor: global exception names --- src/exceptions.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/exceptions.py b/src/exceptions.py index 83099e0..66507a4 100644 --- a/src/exceptions.py +++ b/src/exceptions.py @@ -1,21 +1,25 @@ """ Global exceptions + +Exports: + - UnprocessableContentException + - ConflictException """ from typing import Optional from fastapi import HTTPException, status -class UnprocessableContent(HTTPException): +class UnprocessableContentException(HTTPException): def __init__(self, message: Optional[str] = None) -> None: - detail = "Not authorized" if not message else message + detail = "Unprocessable content" if not message else message super().__init__( status_code=status.HTTP_422_UNPROCESSABLE_CONTENT, detail=detail, ) -class Conflict(HTTPException): +class ConflictException(HTTPException): def __init__(self, message: Optional[str] = None) -> None: detail = "Conflict" if not message else message super().__init__(