File tree Expand file tree Collapse file tree 1 file changed +3
-13
lines changed
unstructured_platform_plugins/etl_uvicorn Expand file tree Collapse file tree 1 file changed +3
-13
lines changed Original file line number Diff line number Diff line change @@ -20,10 +20,6 @@ class UserAuthError(UserError):
2020 status_code : int = 403
2121
2222
23- class UnprocessableEntityError (UserError ):
24- status_code : int = 422
25-
26-
2723class RateLimitError (UserError ):
2824 status_code : int = 429
2925
@@ -45,16 +41,10 @@ class CatchAllError(BaseError):
4541
4642
4743def wrap_error (e : Exception ) -> HTTPException :
48- if isinstance (e , ingest_errors .UserAuthError ):
49- return UserAuthError (e )
50- elif isinstance (e , HTTPException ):
51- if e .status_code == 400 :
52- return UserError (e )
53- if e .status_code == 422 :
54- return UnprocessableEntityError (e )
55- if e .status_code == 504 :
56- return GatewayTimeoutError (e )
44+ if isinstance (e , HTTPException ):
5745 return e
46+ elif isinstance (e , ingest_errors .UserAuthError ):
47+ return UserAuthError (e )
5848 elif isinstance (e , ingest_errors .RateLimitError ):
5949 return RateLimitError (e )
6050 elif isinstance (e , ingest_errors .QuotaError ):
You can’t perform that action at this time.
0 commit comments