Skip to content
This repository has been archived by the owner on Jul 13, 2023. It is now read-only.

Commit

Permalink
bug: report details of an FCM "INVALID_ARGUMENT" error
Browse files Browse the repository at this point in the history
Issue #1373
  • Loading branch information
jrconlin committed Aug 7, 2020
1 parent d5d0fdf commit 377d0cb
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions autopush/router/fcmv1client.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,11 @@ def parse_response(self, content):
err = data.get("error")
if err.get("status") == "NOT_FOUND":
raise FCMNotFoundError("FCM recipient no longer available")
raise RouterException("{}: {}".format(err.get("status"),
err.get("message")))
raise RouterException(
"{}: {} {}".format(
err.get("status"),
err.get("message"),
err.get("details", "No Details")))
if "name" in data:
self.success = 1
except (TypeError, ValueError, KeyError, AttributeError):
Expand Down

0 comments on commit 377d0cb

Please sign in to comment.