Skip to content

Commit

Permalink
fix(agents-api): Convert assertion errors to 422 http errors (#837)
Browse files Browse the repository at this point in the history
<!-- ELLIPSIS_HIDDEN -->



> [!IMPORTANT]
> Convert `AssertionError` to HTTP 422 error in
`prepare_execution_input.py`.
> 
>   - **Error Handling**:
> - Convert `AssertionError` to HTTP 422 error in
`prepare_execution_input.py` using `rewrap_exceptions` decorator.
> 
> <sup>This description was created by </sup>[<img alt="Ellipsis"
src="https://img.shields.io/badge/Ellipsis-blue?color=175173">](https://www.ellipsis.dev?ref=julep-ai%2Fjulep&utm_source=github&utm_medium=referral)<sup>
for b07f915. It will automatically
update as commits are pushed.</sup>

<!-- ELLIPSIS_HIDDEN -->
  • Loading branch information
HamadaSalhab authored Nov 15, 2024
1 parent 28a4702 commit e154e37
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 e154e37

Please sign in to comment.