From 2ab7930e08dd802fc2c3073bdaa1dcc0c42523fe Mon Sep 17 00:00:00 2001 From: yumoqing Date: Thu, 14 Aug 2025 15:31:44 +0800 Subject: [PATCH] bugfix --- uapi/appapi.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/uapi/appapi.py b/uapi/appapi.py index 858c1ca..826cee8 100644 --- a/uapi/appapi.py +++ b/uapi/appapi.py @@ -157,7 +157,11 @@ class UAPI: url = self.env.get('baseurl') + api.path method = api.httpmethod headers = await self.rendertmpl(api.headers) - headers = json.loads(headers) + try: + headers = json.loads(headers) + except Exception as e: + exception(f'{e}, {headers=},{api.headers=}') + raise e body = await self.rendertmpl(api.data) if body: try: