Skip to content
This repository was archived by the owner on Feb 6, 2023. It is now read-only.

Commit 5175eba

Browse files
committed
Don't show not found as a keychain error.
1 parent a8bf748 commit 5175eba

File tree

4 files changed

+7
-1
lines changed

4 files changed

+7
-1
lines changed
Binary file not shown.
Binary file not shown.

Vendor/Branch/BNCKeyChain.m

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,9 @@ + (id) retrieveValueForService:(NSString*)service key:(NSString*)key error:(NSEr
124124
};
125125
CFDataRef valueData = NULL;
126126
OSStatus status = SecItemCopyMatching((__bridge CFDictionaryRef)dictionary, (CFTypeRef *)&valueData);
127+
if (status == errSecItemNotFound) {
128+
return nil;
129+
}
127130
if (status) {
128131
NSError *localError = [self errorWithKey:key OSStatus:status];
129132
BNCLogDebugSDK(@"Can't retrieve key: %@.", localError);

XcodeGitHub/XGGitHubPullRequest.m

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -353,7 +353,10 @@ - (NSError*_Nullable) setStatus:(XGPullRequestStatus)status
353353
error = [NSError errorWithDomain:NSNetServicesErrorDomain
354354
code:NSNetServicesInvalidError userInfo:@{NSLocalizedDescriptionKey:
355355
[NSString stringWithFormat:@"HTTP Status %ld", (long) operation.HTTPStatusCode]}];
356-
BNCLogError(@"Response was: %@.", [operation stringFromResponseData]);
356+
BNCLogError(
357+
@"Can't access GitHub status. Is write access enabled and the token set?\nResponse was: %@.",
358+
[operation stringFromResponseData]
359+
);
357360
return error;
358361
}
359362
return error;

0 commit comments

Comments
 (0)