Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How can I get MissingRegistration or InvalidRegistration errors to show? #19

Open
pineappeal opened this issue Feb 23, 2017 · 1 comment

Comments

@pineappeal
Copy link

I have this up and running just fine and there are no issues as far as basic functionality goes.
What I don't seem to be able to do is getting error response messages to show like "200 + error:MissingRegistration" or "200 + error:InvalidRegistration" or "200 + error:NotRegistered"
I am able to get the basic HTTP response code and the response reason (text) but not the detailed FCM responses. This even happens when I send to an incorrect registration id ... the answer is always OK 200. I'm not sure if this is an issue or if I am not calling the correct response method.

@ThibaultNocchi
Copy link

ThibaultNocchi commented Apr 28, 2019

Ok that may be a little bit late, but I found the solution by looking at another PHP lib for FCM. When I tried it I got the FCM error name, so I decided to dive into the code (as I don't really know how Guzzle works). You can look at line 75 here and see you can call the methods getBody()->getContents() on your response and you get a JSON string to parse. Have a nice day!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants