Skip to content
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

-[ARTRest time:] will fail, but without an error, if no decoder found for response’s MIME type #1442

Open
lawrence-forooghian opened this issue Jul 5, 2022 · 1 comment
Labels
bug Something isn't working. It's clear that this does need to be fixed.

Comments

@lawrence-forooghian
Copy link
Collaborator

lawrence-forooghian commented Jul 5, 2022

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.

ARTErrorInfo *dataError = [self->_encoders[response.MIMEType] decodeErrorInfo:data error:&decodeError];

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).

┆Issue is synchronized with this Jira Task by Unito

@maratal
Copy link
Collaborator

maratal commented Jul 8, 2022

As in case of Accept header in this comment #1420 (comment) I think it's a legacy code in the _time function. Error creation is handled for all requests in the executeRequest:... method:

NSError *dataError = [self->_encoders[response.MIMEType] decodeErrorInfo:data error:&decodeError];

Issue to update _time function - #1445

@umair-ably umair-ably added the bug Something isn't working. It's clear that this does need to be fixed. label May 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working. It's clear that this does need to be fixed.
Development

No branches or pull requests

3 participants