Skip to content

Commit

Permalink
Fix rare postman error
Browse files Browse the repository at this point in the history
  • Loading branch information
TheTechromancer committed Feb 6, 2024
1 parent 2193fe5 commit 0c896e2
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions bbot/modules/postman.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,8 @@ async def search_workspace(self, id):
status_code = getattr(r, "status_code", 0)
try:
json = r.json()
if not isinstance(json, dict):
raise ValueError(f"Got unexpected value for JSON: {json}"
except Exception as e:
self.warning(f"Failed to decode JSON for {r.url} (HTTP status: {status_code}): {e}")
return [], []
Expand Down

0 comments on commit 0c896e2

Please sign in to comment.