Skip to content

Commit

Permalink
sync: Handle missing error string for abnormal statuses
Browse files Browse the repository at this point in the history
  • Loading branch information
russellhancox committed Jul 25, 2024
1 parent 0725fcc commit 75d0ab3
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Source/santasyncservice/SNTSyncStage.mm
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,9 @@ - (NSData *)dataFromRequest:(NSURLRequest *)request
errStr = [NSHTTPURLResponse localizedStringForStatusCode:response.statusCode];
} else {
code = (long)requestError.code;
if (code == 0) code = response.StatusCode;
errStr = requestError.localizedDescription;
if (!errStr) errStr = @"Unknown Error";
}
LOGE(@"HTTP Response: %ld %@", code, errStr);
if (error != NULL) {
Expand Down

0 comments on commit 75d0ab3

Please sign in to comment.