File tree Expand file tree Collapse file tree 1 file changed +1
-11
lines changed Expand file tree Collapse file tree 1 file changed +1
-11
lines changed Original file line number Diff line number Diff line change 3333
3434@app .exception_handler (StarletteHTTPException )
3535async def custom_http_exception_handler (request : Request , exc : StarletteHTTPException ):
36- if exception_reporter .disabled is False :
36+ if ( exception_reporter .disabled is False ) and ( 500 <= exc . status_code < 600 ) :
3737 exception_reporter .report (request , exc .status_code , get_user (request ))
3838
3939 return await http_exception_handler (request , exc )
4040
4141
42- @app .exception_handler (RequestValidationError )
43- async def custom_request_validation_exception_handler (
44- request : Request , exc : RequestValidationError
45- ):
46- exception_reporter .report (
47- request , status .HTTP_422_UNPROCESSABLE_ENTITY , get_user (request )
48- )
49- return await request_validation_exception_handler (request , exc )
50-
51-
5242@app .exception_handler (Exception )
5343async def custom_exception_handler (request : Request , exc : Exception ):
5444 exception_reporter .report (
You can’t perform that action at this time.
0 commit comments