Skip to content

Commit

Permalink
Merge pull request #65 from kayac/fix/fcmv1-notfound
Browse files Browse the repository at this point in the history
Treat a response includes NOT_FOUND as an error.
  • Loading branch information
fujiwara authored Jan 27, 2020
2 parents 45b4f0b + 00772ac commit 5993f85
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions fcmv1/error.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ type FCMErrorResponseCode int
const (
InvalidArgument = "INVALID_ARGUMENT"
Unregistered = "UNREGISTERED"
NotFound = "NOT_FOUND"
)

type Error struct {
Expand Down
2 changes: 1 addition & 1 deletion supervisor.go
Original file line number Diff line number Diff line change
Expand Up @@ -425,7 +425,7 @@ func handleFCMResponse(resp SenderResponse, retryq chan<- Request, cmdq chan Com
case fcm.InvalidRegistration.String(), fcm.NotRegistered.String():
onResponse(result, errorResponseHandler.HookCmd(), cmdq)
LogWithFields(logf).Errorf("%s", err)
case fcmv1.Unregistered, fcmv1.InvalidArgument:
case fcmv1.Unregistered, fcmv1.InvalidArgument, fcmv1.NotFound:
onResponse(result, errorResponseHandler.HookCmd(), cmdq)
LogWithFields(logf).Errorf("%s", err)
default:
Expand Down

0 comments on commit 5993f85

Please sign in to comment.