Skip to content

Commit

Permalink
Use exception args
Browse files Browse the repository at this point in the history
  • Loading branch information
kumaranvpl committed Aug 12, 2024
1 parent 09e9157 commit 497692e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fastagency/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ async def handle_keynotfounderror_middleware(
try:
return await call_next(request)
except KeyNotFoundError as e:
return JSONResponse(status_code=404, content={"detail": str(e)})
return JSONResponse(status_code=404, content={"detail": e.args[0]})


@app.get("/models/schemas")
Expand Down

0 comments on commit 497692e

Please sign in to comment.