diff --git a/aikido_zen/background_process/api/__init__.py b/aikido_zen/background_process/api/__init__.py index b2566d30e..aa6c1bc3b 100644 --- a/aikido_zen/background_process/api/__init__.py +++ b/aikido_zen/background_process/api/__init__.py @@ -22,9 +22,13 @@ def to_api_response(res: Response): return res.json() except Exception as e: logger.debug( - "Trying to load json, failed: %s (body=%s)", str(e), res.text + "Parsing JSON response from core failed: %s (body=%s)", + str(e), + res.text, ) - return {"success": False, "error": "unknown_error"} + return {"success": False, "error": "json_parsing_failed"} + logger.debug("Parsing response from core failed: [%s] %s", status, res.text) + return {"success": False, "error": "status_code_not_200"} def report(self, token, event, timeout_in_sec): """Report event to aikido server"""