Skip to content

Commit 30b0cfc

Browse files
committed
fix exception handling
1 parent c2b9593 commit 30b0cfc

File tree

3 files changed

+11
-2
lines changed

3 files changed

+11
-2
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## 0.0.12
2+
3+
* **Bugfix: Fix UnrecoverableException exception handling to include full response**
4+
15
## 0.0.11
26

37
* **Bugfix: Add UnrecoverableException exception handling back**
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = "0.0.11" # pragma: no cover
1+
__version__ = "0.0.12" # pragma: no cover

unstructured_platform_plugins/etl_uvicorn/api_generator.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,12 @@ async def _stream_response():
161161
)
162162
except UnrecoverableException as ex:
163163
logger.info("Unrecoverable error occurred during plugin invocation")
164-
return InvokeResponse(usage=usage, status_code=512, status_code_text=ex.message)
164+
return InvokeResponse(
165+
usage=usage,
166+
status_code=512,
167+
status_code_text=ex.message,
168+
filedata_meta=filedata_meta_model.model_validate(filedata_meta.model_dump()),
169+
)
165170
except Exception as invoke_error:
166171
logger.error(f"failed to invoke plugin: {invoke_error}", exc_info=True)
167172
return InvokeResponse(

0 commit comments

Comments
 (0)