Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions aikido_zen/background_process/api/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

include actual status code?


def report(self, token, event, timeout_in_sec):
"""Report event to aikido server"""
Expand Down
Loading