File tree Expand file tree Collapse file tree 1 file changed +3
-7
lines changed
Expand file tree Collapse file tree 1 file changed +3
-7
lines changed Original file line number Diff line number Diff line change @@ -42,14 +42,10 @@ def subscribe_notification(self) -> dict | None:
4242 print (f"Headers: { request_headers } " )
4343 print (f"Payload: { json .dumps (subscription_payload , indent = 2 )} " )
4444
45- if response .status_code == 200 :
45+ if response .status_code == 201 :
4646 return response .json ()
4747 elif response .status_code == 404 :
4848 return None
4949 else :
50- try :
51- 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 )
50+ msg = "Please provide the correct resource type for this endpoint"
51+ raise UnhandledResponseError (response = response .json (), message = msg )
You can’t perform that action at this time.
0 commit comments