bytefish / FcmSharp

Firebase Cloud Messaging (FCM) with .NET
MIT License
6 stars 7 forks source link

FcmSharp.Exceptions.FcmMessageException was thrown without any details provided #10

Closed yar1k0v closed 6 years ago

yar1k0v commented 6 years ago

I got this exception but can't find a reason for it.

bytefish commented 6 years ago

Please add some code to reproduce the issue.

astalegale commented 6 years ago

Hi, i was able to reproduce the error.

If you write a wrong project in FileBasedFcmClientSettings.CreateFromFile the library will throw the above exception without a clear error message.

Regards Alex

bytefish commented 6 years ago

Did you look into the HttpResponse included in the Exception? There you will find the Error Message I guess. I will reproduce and add a better Exception message.

bytefish commented 6 years ago

@astalegale @yar1k0v I have added an error message, so you don't need to read the Error Object included in the response to have a quick look at what's the problem. The message is just the JSON Content, that came back from the server and it should explain the error as detailed as possible. I will release a new version as soon as Issue #12 has been fixed.

bytefish commented 6 years ago

Better error messaging is now available in release 2.2.0.