Skip to content

The agent that grows with you

fix(photon): a misshapen lines payload keeps the iMessage line lookup best-effort

Teknium95d0629df416
diff --git a/plugins/platforms/photon/cli.py b/plugins/platforms/photon/cli.py
index bc1f76c509d..18c3b51957d 100644
--- a/plugins/platforms/photon/cli.py
+++ b/plugins/platforms/photon/cli.py
@@ -247,7 +247,7 @@ def _lookup_imessage_line(token: str, dashboard_id: str) -> Optional[str]:
"""The project's dedicated iMessage line (fallback when the user row names none)."""
try:
line = photon_auth.get_imessage_line(token, dashboard_id)
- except (photon_auth.httpx.HTTPError, RuntimeError, ValueError) as e: # transport / status / bad JSON
+ except (photon_auth.httpx.HTTPError, RuntimeError, ValueError, AttributeError, TypeError) as e: # transport / status / bad or misshapen JSON
print(f" (could not fetch the assigned line: {e})", file=sys.stderr)
return None
return line.get("phoneNumber") if line else None