-
Notifications
You must be signed in to change notification settings - Fork 10
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
Remove unspecified error? #12
Comments
From what I understand from the docs is that the response of the UNSPECIFIED_ERROR doesn't contain a http status code and will be handled in the next if check returning EDIT: it always has a http status code, it's just not known in that case... |
I can't say never as API docs are incomplete, but if UNSPECIFIED_ERROR has same JSON location as the UNREGISTERED, then the if condition for The point which I'm trying to make is that API which can't be implemented reliably (because the current FCM API docs are incomplete) should be removed. From library user standpoint the |
I would also have implemented it this way from the docs, but yeah you make a valid point in those being unclear. |
I received this
FcmResponse
That is FcmError enum variant
UNREGISTERED
. If similar JSON response is also used for enum variantUNSPECIFIED_ERROR
then current code detectsFcmResponseError::Unknown
and not the correctFcmResponseError::Unspecified
.The FCM v1 API docs do not have exact JSON location for the FcmError. Only the successful JSON respose is documented for send HTTP route. Because of that I think it would be the best to remove the
FcmResponseError::Unspecified
. Should I do PR which does that?The text was updated successfully, but these errors were encountered: