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?