Skip to content
This repository has been archived by the owner on Dec 7, 2019. It is now read-only.

Commit

Permalink
Merge branch 'feature/13' into develop
Browse files Browse the repository at this point in the history
Close #13
  • Loading branch information
weierophinney committed May 8, 2018
2 parents c52e0e6 + 7a6e2fc commit 8eb2eef
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 1 deletion.
6 changes: 5 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,14 @@

All notable changes to this project will be documented in this file, in reverse chronological order by release.

## 2.0.1 - TBD
## 2.1.0 - TBD

### Added

- [#13](https://github.com/zendframework/ZendService_Google_Gcm/pull/13) adds constants mapping to common GCM error codes as `ZendService\Gcm\Response::ERROR_*`.

### Changed

- Nothing.

### Deprecated
Expand Down
18 changes: 18 additions & 0 deletions library/Gcm/Response.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,24 @@ class Response
*/
const RESULT_CANONICAL = 'registration_id';

/**
* Error field responses
* @link https://developers.google.com/cloud-messaging/http-server-ref#error-codes
* @var string
*/
const ERROR_MISSING_REGISTRATION = 'MissingRegistration';
const ERROR_INVALID_REGISTRATION = 'InvalidRegistration';
const ERROR_NOT_REGISTERED = 'NotRegistered';
const ERROR_INVALID_PACKAGE_NAME = 'InvalidPackageName';
const ERROR_MISMATCH_SENDER_ID = 'MismatchSenderId';
const ERROR_MESSAGE_TOO_BIG = 'MessageTooBig';
const ERROR_INVALID_DATA_KEY = 'InvalidDataKey';
const ERROR_INVALID_TTL = 'InvalidTtl';
const ERROR_UNAVAILABLE = 'Unavailable';
const ERROR_INTERNAL_SERVER_ERROR = 'InternalServerError';
const ERROR_DEVICE_MESSAGE_RATE_EXCEEDED = 'DeviceMessageRateExceeded';
const ERROR_TOPICS_MESSAGE_RATE_EXCEEDED = 'TopicsMessageRateExceeded';

/**
* @var int
*/
Expand Down

0 comments on commit 8eb2eef

Please sign in to comment.