Skip to content

Commit e49572c

Browse files
committed
safety
1 parent 5410997 commit e49572c

File tree

1 file changed

+3
-1
lines changed
  • unstructured_platform_plugins/etl_uvicorn

1 file changed

+3
-1
lines changed

unstructured_platform_plugins/etl_uvicorn/errors.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,9 @@ def wrap_error(e: Exception) -> HTTPException:
4040
"""
4141
Wraps an exception in a HTTPException.
4242
"""
43-
if isinstance(e, ingest_errors.UserAuthError):
43+
if isinstance(e, HTTPException):
44+
return e
45+
elif isinstance(e, ingest_errors.UserAuthError):
4446
return UserAuthError(e)
4547
elif isinstance(e, ingest_errors.RateLimitError):
4648
return RateLimitError(e)

0 commit comments

Comments
 (0)