mirror of
https://github.com/langgenius/dify.git
synced 2026-04-26 18:27:15 +08:00
Merge branch 'fix/chore-fix' into dev/plugin-deploy
This commit is contained in:
commit
b2fdf4f85f
@ -1,3 +1,4 @@
|
|||||||
|
import inspect
|
||||||
import json
|
import json
|
||||||
import logging
|
import logging
|
||||||
from collections.abc import Callable, Generator
|
from collections.abc import Callable, Generator
|
||||||
@ -139,7 +140,8 @@ class BasePluginManager:
|
|||||||
self._handle_plugin_daemon_error(error.error_type, error.message, error.args)
|
self._handle_plugin_daemon_error(error.error_type, error.message, error.args)
|
||||||
raise ValueError(f"{rep.message}, code: {rep.code}")
|
raise ValueError(f"{rep.message}, code: {rep.code}")
|
||||||
if rep.data is None:
|
if rep.data is None:
|
||||||
raise ValueError("got empty data from plugin daemon")
|
frame = inspect.currentframe()
|
||||||
|
raise ValueError(f"got empty data from plugin daemon: {frame.f_lineno if frame else 'unknown'}")
|
||||||
|
|
||||||
return rep.data
|
return rep.data
|
||||||
|
|
||||||
@ -178,7 +180,8 @@ class BasePluginManager:
|
|||||||
self._handle_plugin_daemon_error(error.error_type, error.message, error.args)
|
self._handle_plugin_daemon_error(error.error_type, error.message, error.args)
|
||||||
raise ValueError(f"plugin daemon: {rep.message}, code: {rep.code}")
|
raise ValueError(f"plugin daemon: {rep.message}, code: {rep.code}")
|
||||||
if rep.data is None:
|
if rep.data is None:
|
||||||
raise ValueError("got empty data from plugin daemon")
|
frame = inspect.currentframe()
|
||||||
|
raise ValueError(f"got empty data from plugin daemon: {frame.f_lineno if frame else 'unknown'}")
|
||||||
yield rep.data
|
yield rep.data
|
||||||
|
|
||||||
def _handle_plugin_daemon_error(self, error_type: str, message: str, args: Optional[dict] = None):
|
def _handle_plugin_daemon_error(self, error_type: str, message: str, args: Optional[dict] = None):
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user