fix: use status.HTTP_422_UNPROCESSABLE_CONTENT
This commit is contained in:
parent
aefe4e0bda
commit
6b623cd7fb
@ -46,7 +46,7 @@ async def create_source(
|
||||
registry.get_parser(body.parser_name)
|
||||
except Exception:
|
||||
raise HTTPException(
|
||||
status_code=status.HTTP_422_UNPROCESSABLE_ENTITY,
|
||||
status_code=status.HTTP_422_UNPROCESSABLE_CONTENT,
|
||||
detail=f"No parser registered with name '{body.parser_name}'",
|
||||
) from None
|
||||
|
||||
@ -98,7 +98,7 @@ async def update_source(
|
||||
registry.get_parser(update_data["parser_name"])
|
||||
except Exception:
|
||||
raise HTTPException(
|
||||
status_code=status.HTTP_422_UNPROCESSABLE_ENTITY,
|
||||
status_code=status.HTTP_422_UNPROCESSABLE_CONTENT,
|
||||
detail=f"No parser registered with name '{update_data['parser_name']}'",
|
||||
) from None
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user