only print the full dictionary on unexpected results

This commit is contained in:
2024-02-17 09:58:32 -07:00
parent b53d7a5e0d
commit 58aa3fdda7

View File

@@ -82,6 +82,7 @@ try:
vapid_claims={"sub": "mailto:info@timesafari.app"}
)
print(f"Response: {response}")
if response.status_code != 201:
print(f"Full response: {response.__dict__}")
# log the .reason from Apple
# https://developer.apple.com/documentation/usernotifications/sending_web_push_notifications_in_web_apps_and_browsers#3994594