Skip to content

Commit ae136c7

Browse files
committed
Return InvokeResponse when handling exception
1 parent 1415299 commit ae136c7

File tree

2 files changed

+2
-7
lines changed

2 files changed

+2
-7
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = "0.0.31" # pragma: no cover
1+
__version__ = "0.0.32" # pragma: no cover

unstructured_platform_plugins/etl_uvicorn/api_generator.py

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
from functools import partial
77
from typing import Any, Callable, Optional, Union
88

9-
from fastapi import FastAPI, HTTPException, status
9+
from fastapi import FastAPI, status
1010
from fastapi.responses import StreamingResponse
1111
from opentelemetry.instrumentation.fastapi import FastAPIInstrumentor
1212
from pydantic import BaseModel, Field, create_model
@@ -208,11 +208,6 @@ async def _stream_response():
208208
output=output,
209209
file_data=request_dict.get("file_data", None),
210210
)
211-
except HTTPException as exc:
212-
logger.error(
213-
f"HTTPException: {exc.detail} (status_code={exc.status_code})", exc_info=True
214-
)
215-
raise
216211
except UnrecoverableException as ex:
217212
logger.info("Unrecoverable error occurred during plugin invocation")
218213
return InvokeResponse(

0 commit comments

Comments
 (0)