Skip to content

Commit 90677eb

Browse files
committed
instead of weird unknown_error give something descriptive
1 parent 9671b29 commit 90677eb

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

aikido_zen/background_process/api/__init__.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,8 @@ def to_api_response(res: Response):
2424
logger.debug(
2525
"Trying to load json, failed: %s (body=%s)", str(e), res.text
2626
)
27-
return {"success": False, "error": "unknown_error"}
27+
logger.debug("ReportingApi.to_api_response: Failed for [%s] %s", status, res.text)
28+
return {"success": False, "error": "status_code_not_200"}
2829

2930
def report(self, token, event, timeout_in_sec):
3031
"""Report event to aikido server"""

0 commit comments

Comments
 (0)