error messages

This commit is contained in:
Jörn-Michael Miehe 2022-03-31 16:49:04 +00:00
parent a88168b8d4
commit 583d1de06a
2 changed files with 1 additions and 2 deletions

View file

@ -36,7 +36,7 @@ class Responses:
"content": None, "content": None,
} }
NEEDS_PERMISSION = { NEEDS_PERMISSION = {
"description": "You're not allowed that operation", "description": "Operation not permitted",
"content": None, "content": None,
} }
ENTRY_EXISTS = { ENTRY_EXISTS = {

View file

@ -61,7 +61,6 @@ async def add_device(
status.HTTP_400_BAD_REQUEST: Responses.NOT_INSTALLED, status.HTTP_400_BAD_REQUEST: Responses.NOT_INSTALLED,
status.HTTP_401_UNAUTHORIZED: Responses.NEEDS_USER, status.HTTP_401_UNAUTHORIZED: Responses.NEEDS_USER,
status.HTTP_403_FORBIDDEN: Responses.NEEDS_PERMISSION, status.HTTP_403_FORBIDDEN: Responses.NEEDS_PERMISSION,
status.HTTP_404_NOT_FOUND: Responses.ENTRY_DOESNT_EXIST,
}, },
response_model=User, response_model=User,
) )