diff --git a/bbot/modules/postman.py b/bbot/modules/postman.py index e58169d026..5a63f824e3 100644 --- a/bbot/modules/postman.py +++ b/bbot/modules/postman.py @@ -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 [], []