Skip to content

Commit

Permalink
fix(agents-api): Convert assertion errors to 422 http errors
Browse files Browse the repository at this point in the history
  • Loading branch information
HamadaSalhab committed Nov 15, 2024
1 parent 28a4702 commit b07f915
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
QueryException: partialclass(HTTPException, status_code=400),
ValidationError: partialclass(HTTPException, status_code=400),
TypeError: partialclass(HTTPException, status_code=400),
AssertionError: lambda e: HTTPException(status_code=422, detail=str(e)),
}
)
@wrap_in_class(
Expand Down

0 comments on commit b07f915

Please sign in to comment.