We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 288a5b5 commit 1aea42fCopy full SHA for 1aea42f
1 file changed
AppBox/Common/NetworkHandler/NetworkHandler.m
@@ -26,7 +26,11 @@ +(void)requestWithURL:(NSString *)url withParameters:(id)parmeters andRequestTyp
26
// Parse the body as JSON (mirrors AFJSONResponseSerializer).
27
id responseObject = nil;
28
if (data.length > 0) {
29
- responseObject = [NSJSONSerialization JSONObjectWithData:data options:0 error:nil];
+ NSError *jsonError = nil;
30
+ responseObject = [NSJSONSerialization JSONObjectWithData:data options:0 error:&jsonError];
31
+ if (jsonError) {
32
+ DDLogDebug(@"JSON parsing failed for URL: %@", jsonError.localizedDescription);
33
+ }
34
}
35
36
BOOL httpSuccess = (statusCode >= 200 && statusCode < 300);
0 commit comments