-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* 'Cannot Pickle' RLock Bug fix; Update & Refactor tests; Minor refactoring * Update packages * AgencyConfig Validation bug fix; Update tests * Add error handler for Pydantic validation errors
- Loading branch information
Showing
10 changed files
with
837 additions
and
335 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import logging | ||
from http import HTTPStatus | ||
|
||
from fastapi import Request | ||
from fastapi.responses import JSONResponse | ||
|
||
logger = logging.getLogger(__name__) | ||
|
||
|
||
async def bad_request_exception_handler(request: Request, exc: ValueError): # noqa: ARG001 | ||
return JSONResponse( | ||
status_code=HTTPStatus.BAD_REQUEST, | ||
content={"detail": str(exc)}, | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.