mirror of
https://github.com/langgenius/dify.git
synced 2026-09-08 11:04:27 +08:00
refactor: preserve exception context when re-raising in except blocks (#40432)
Co-authored-by: Asuka Minato <i@asukaminato.eu.org>
This commit is contained in:
parent
8fc11b2927
commit
93287f22a8
@ -380,8 +380,8 @@ class BasePluginClient:
|
||||
if rep.code == -500:
|
||||
try:
|
||||
error = PluginDaemonError.model_validate(json.loads(rep.message))
|
||||
except Exception:
|
||||
raise PluginDaemonInnerError(code=rep.code, message=rep.message)
|
||||
except Exception as e:
|
||||
raise PluginDaemonInnerError(code=rep.code, message=rep.message) from e
|
||||
|
||||
logger.error("Error in stream response for plugin %s", rep.__dict__)
|
||||
self._handle_plugin_daemon_error(error.error_type, error.message)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user