Raudius / Pushraven

A simple Java library to interface with Firebase Cloud Messaging (FCM) API. Pushraven allows you to push notifications to clients in very few lines of code.
MIT License
78 stars 34 forks source link

Adding success response message #4

Closed MojoJojo961 closed 8 years ago

MojoJojo961 commented 8 years ago

Success response message when fcm sends back some response in addition to 200 status

Raudius commented 8 years ago

Thanks for the contribution.

MojoJojo961 commented 8 years ago

Well it only does when the status code is other than 200. In such cases it gives a proper error message regarding the error.

For e.g. if you get 401 error, the error stream may give the error message send by the fcm which would be : 'The request was missing an Authentification Key (FCM Token). Please, refer to section "Authentification" of the FCM documentation, at <a href="https://firebase.google.com/docs/cloud-messaging/server">https://firebase.google.com/docs/cloud-messaging/server</a>.<BODY BGCOLOR="#FFFFFF" TEXT="#000000">

The request was missing an Authentification Key (FCM Token). Please, refer to section "Authentification" of the FCM documentation, at https://firebase.google.com/docs/cloud-messaging/server.

Error 401

'

Any which ways thanks for the git repo. The code really helped me a lot.

On 28-11-2016 07:18 PM, Raudius wrote:

Thanks for the contribution. Do you know if FCM ever returns anything in the Error Stream?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/Raudius/Pushraven/pull/4#issuecomment-263275198, or mute the thread https://github.com/notifications/unsubscribe-auth/AJoIlD2mX-R6CDGE7SdGIPlaGHaho0B8ks5rCtusgaJpZM4K9p2l.