Skip to content

Type specification not aligned with actual return value #260

@MalotteAtKivra

Description

@MalotteAtKivra

We are using the function apns:push_notification/3 that has the below type specification:

-spec push_notification( apns_connection:name() | pid() , device_id() , json() ) -> response() | {error, not_connection_owner}.
where response is defined as below:

-type response() :: { integer() , [term()] , [term()] | no_body } | timeout.

However the response we get has the format of a binary with a json-string:
{400, _, <<"{\"reason\":\"BadDeviceToken\"}">>}

Is the type specification or the response format wrong?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions