Skip to content

Remove unspecified error? #12

@jutuon

Description

@jutuon

I received this FcmResponse

FcmResponse {
    http_status_code: 404,
    response_json_object: {
        "error": Object {
            "code": Number(404),
            "message": String("Requested entity was not found."),
            "status": String("NOT_FOUND"),
            "details": Array [
                Object {
                    "@type": String("type.googleapis.com/google.firebase.fcm.v1.FcmError"),
                    "errorCode": String("UNREGISTERED"),
                },
            ],
        },
    },
    retry_after: None,
}

That is FcmError enum variant UNREGISTERED. If similar JSON response is also used for enum variant UNSPECIFIED_ERROR then current code detects FcmResponseError::Unknown and not the correct FcmResponseError::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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions