We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 88c3a7f commit aeb60adCopy full SHA for aeb60ad
mns_subscription/src/mns_service.py
@@ -47,5 +47,9 @@ def subscribe_notification(self) -> dict | None:
47
elif response.status_code == 404:
48
return None
49
else:
50
- msg = "Please provide the correct resource type for this endpoint"
51
- raise UnhandledResponseError(response=response.json(), message=msg)
+ try:
+ api_error = response.json()
52
+ except Exception:
53
+ api_error = response.text
54
+ msg = f"MNS subscription failed with status {response.status_code}: {api_error}"
55
+ raise UnhandledResponseError(response=api_error, message=msg)
0 commit comments