Skip to content
This repository was archived by the owner on Aug 30, 2023. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion AUTHORS
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,5 @@ Arthur Darcet- https://github.com/arthurdarcet
lesterkp - https://github.com/lesterkp
Christoph Lupprich - https://github.com/clupprich
Dmitry Vorobyov - https://github.com/dvor
Mark Anderson - https://github.com/manderson-productions
Mark Anderson - https://github.com/manderson-productions
Marc Doering - https://github.com/triskybro
19 changes: 14 additions & 5 deletions Raven/RavenClient.m
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ - (instancetype)initWithDSN:(NSString *)DSN extra:(NSDictionary *)extra tags:(NS

// Parse DSN
if (_config && ![_config setDSN:DSN]) {
NSLog(@"Invalid DSN %@!", DSN);
NSLog(@"Invalid DSN: %@", DSN);
return nil;
}
}
Expand Down Expand Up @@ -431,12 +431,21 @@ - (void)sendJSON:(NSData *)JSON {
[request setValue:header forHTTPHeaderField:@"X-Sentry-Auth"];

[NSURLConnection sendAsynchronousRequest:request queue:[NSOperationQueue currentQueue] completionHandler:^(NSURLResponse *response, NSData *data, NSError *connectionError) {
if (data) {
NSLog(@"JSON sent to Sentry");
} else {
NSLog(@"Connection failed! Error - %@ %@", [connectionError localizedDescription], [[connectionError userInfo] objectForKey:NSURLErrorFailingURLStringErrorKey]);
if (connectionError) {
if (data) {
NSString *dataString = [[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding];
NSLog(@"Connection failed! Error - %@ %@ %@", [connectionError localizedDescription], [[connectionError userInfo] objectForKey:NSURLErrorFailingURLStringErrorKey], dataString);
} else {
NSLog(@"Connection failed! Error - %@ %@", [connectionError localizedDescription], [[connectionError userInfo] objectForKey:NSURLErrorFailingURLStringErrorKey]);
}

} else if (response) {
NSLog(@"Response from Sentry: %@", response);
}
}];

NSLog(@"JSON sent to Sentry");

}

#pragma mark - JSON helpers
Expand Down