From 32d0b4ac63c9d7e73e706f61f072558b17476001 Mon Sep 17 00:00:00 2001 From: guohelu <19503896967@163.com> Date: Tue, 19 Nov 2024 19:56:37 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E5=BC=95=E7=94=A8?= =?UTF-8?q?=E4=B8=8B=E6=9E=B6=E4=B8=89=E6=96=B9=E6=8F=92=E4=BB=B6=E6=8A=A5?= =?UTF-8?q?=E9=94=99=E9=97=AE=E9=A2=98=20--story=3D120780681?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .pre-commit-config.yaml | 2 +- plugin_service/api_decorators.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index fcb847f..3c8a985 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -10,7 +10,7 @@ repos: - id: black language_version: python3 - repo: https://github.com/pycqa/isort - rev: 5.6.4 + rev: 5.13.2 hooks: - id: isort args: ["--profile", "black", "--filter-files"] diff --git a/plugin_service/api_decorators.py b/plugin_service/api_decorators.py index 9c6e06f..cf26775 100644 --- a/plugin_service/api_decorators.py +++ b/plugin_service/api_decorators.py @@ -42,7 +42,7 @@ def wrapper(request: Request): plugin_client = PluginServiceApiClient(plugin_code) except PluginServiceException as e: logger.error(f"[inject_plugin_client] error: {e}") - return JsonResponse({"message": e, "result": False, "data": None}) + return JsonResponse({"message": str(e), "result": False, "data": None}) setattr(request, "plugin_client", plugin_client) return func(request)