mirror of
https://github.com/hay-kot/mealie.git
synced 2025-08-22 06:23:34 -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")
|
||||
raise HTTPException(status_code=404, detail=ErrorResponse.respond(message="No Entry Found"))
|
||||
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(
|
||||
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:
|
||||
self.logger.error("SQL Integrity Error on recipe controller action")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue