mirror of
https://github.com/hay-kot/mealie.git
synced 2025-08-22 14:33:33 -07:00
fixup
Signed-off-by: Litchi Pi <litchi.pi@proton.me>
This commit is contained in:
parent
9d0a0990e6
commit
354b00a7b4
1 changed files with 3 additions and 2 deletions
|
@ -85,10 +85,11 @@ class RecipeController(BaseRecipeController):
|
||||||
self.logger.error("No Entry Found on recipe controller action")
|
self.logger.error("No Entry Found on recipe controller action")
|
||||||
raise HTTPException(status_code=404, detail=ErrorResponse.respond(message="No Entry Found"))
|
raise HTTPException(status_code=404, detail=ErrorResponse.respond(message="No Entry Found"))
|
||||||
elif thrownType == exceptions.IncompleteData:
|
elif thrownType == exceptions.IncompleteData:
|
||||||
self.logger.error("Incomplete data provided to API route:", ex.missing)
|
missing = ex.__context__["missing"]
|
||||||
|
self.logger.error("Incomplete data provided to API route:", missing)
|
||||||
raise HTTPException(
|
raise HTTPException(
|
||||||
status_code=400,
|
status_code=400,
|
||||||
detail=ErrorResponse.respond(message=f"Field '{ex.missing}' missing on the body of this API request"),
|
detail=ErrorResponse.respond(message=f"Field '{missing}' missing on the body of this API request"),
|
||||||
)
|
)
|
||||||
elif thrownType == sqlalchemy.exc.IntegrityError:
|
elif thrownType == sqlalchemy.exc.IntegrityError:
|
||||||
self.logger.error("SQL Integrity Error on recipe controller action")
|
self.logger.error("SQL Integrity Error on recipe controller action")
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue