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

Commit

Permalink
Merge pull request #13 from klatys/constants-for-errors
Browse files Browse the repository at this point in the history
add constants for error messages
  • Loading branch information
weierophinney committed May 8, 2018
2 parents c52e0e6 + cd21402 commit 74ba3cd
Showing 1 changed file with 18 additions and 0 deletions.
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 74ba3cd

Please sign in to comment.