summaryrefslogtreecommitdiff
path: root/Juick/API.m
diff options
context:
space:
mode:
Diffstat (limited to 'Juick/API.m')
-rw-r--r--Juick/API.m4
1 files changed, 3 insertions, 1 deletions
diff --git a/Juick/API.m b/Juick/API.m
index ce8915a..4c3edc2 100644
--- a/Juick/API.m
+++ b/Juick/API.m
@@ -9,6 +9,8 @@
#import "Chat.h"
#import "API.h"
+NSString * const JuickErrorDomain = @"JuickErrorDomain";
+
@interface API ()
@property(nonatomic, strong) NSURL *baseURL;
@property(nonatomic, strong) NSURLSession *urlSession;
@@ -207,7 +209,7 @@
NSInteger statusCode = ((NSHTTPURLResponse *)response).statusCode;
if (!response || statusCode != 200) {
NSURL *url = request.URL;
- NSError *err = [NSError errorWithDomain:@"JuickErrorDomain"
+ NSError *err = [NSError errorWithDomain:JuickErrorDomain
code:statusCode
userInfo:@{@"url": url.absoluteString}];
callback(nil, err);