You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When client.sendTwitterRequest fails due to an error from Twitter (for example 400 bad request), there needs to be a way to view the response body since it has the detailed error message from Twitter.
Actual behavior
There's no way to view the response body when request fails, the response and data object are nil, and connectionError doesn't show the error from the response body.
[client sendTwitterRequest:request completion:^(NSURLResponse *response, NSData *data, NSError *connectionError) {
if (data) {
// handle the response data e.g.
NSError *jsonError;
NSDictionary *json = [NSJSONSerialization JSONObjectWithData:data options:0 error:&jsonError];
}
else {
NSLog(@"Error: %@", connectionError);
}
}];
Expected behavior
When client.sendTwitterRequest fails due to an error from Twitter (for example 400 bad request), there needs to be a way to view the response body since it has the detailed error message from Twitter.
Actual behavior
There's no way to view the response body when request fails, the response and data object are nil, and connectionError doesn't show the error from the response body.
Steps to reproduce the behavior
Try calling a Twitter API with invalid parameters, for example https://upload.twitter.com/1.1/media/upload.json
The text was updated successfully, but these errors were encountered: