diff options
author | Vitaly Takmazov | 2020-03-23 15:48:18 +0300 |
---|---|---|
committer | Vitaly Takmazov | 2020-03-23 15:48:18 +0300 |
commit | 9ef05b8271c3849a5f081ebaea41b23390fa25d1 (patch) | |
tree | 186f45734b2e97eac60bd96675e418c41c128c9a /Juick/APIClient.m | |
parent | a097b71ab3a6aaedaef4a203d6d9804797537ed9 (diff) |
Display failed url if present
Diffstat (limited to 'Juick/APIClient.m')
-rw-r--r-- | Juick/APIClient.m | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Juick/APIClient.m b/Juick/APIClient.m index 28c64ca..e988edc 100644 --- a/Juick/APIClient.m +++ b/Juick/APIClient.m @@ -206,9 +206,10 @@ } else { NSInteger statusCode = ((NSHTTPURLResponse *)response).statusCode; if (!response || statusCode != 200) { + NSURL *url = request.URL; NSError *err = [NSError errorWithDomain:@"JuickErrorDomain" code:statusCode - userInfo:nil]; + userInfo:@{@"url": url.absoluteString}]; [[NSOperationQueue mainQueue] addOperationWithBlock:^{ callback(nil, err); }]; |