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: