ably-cocoa
ably-cocoa copied to clipboard
`-[ARTRest time:]` will fail, but without an error, if no decoder found for response’s MIME type
If self->_encoders[response.MIMEType]
is nil
, then we'll end up calling the callback with both time
and error
being nil
, which is not a valid behaviour.
https://github.com/ably/ably-cocoa/blob/0fe3c59658ce7d0b7181571cdad1f068d4085088/Source/ARTRest.m#L519
We need to handle this (if the feature spec has something to say about how this should be handled, then we should do that, else we should probably define it in the spec – the SDK should generate some sort of error).
As in case of Accept
header in this comment https://github.com/ably/ably-cocoa/pull/1420#discussion_r917117828 I think it's a legacy code in the _time
function. Error creation is handled for all requests in the executeRequest:...
method:
https://github.com/ably/ably-cocoa/blob/0fe3c59658ce7d0b7181571cdad1f068d4085088/Source/ARTRest.m#L372
Issue to update _time
function - https://github.com/ably/ably-cocoa/issues/1445