Skip to content

Commit

Permalink
Returning getItem() error description to JS
Browse files Browse the repository at this point in the history
  • Loading branch information
thousight authored May 22, 2019
1 parent 46ae4ff commit 6bcbe71
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion ios/RNSensitiveInfo/RNSensitiveInfo.m
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,11 @@ - (NSString *)messageForError:(NSError *)error
localizedReason:prompt
reply:^(BOOL success, NSError * _Nullable error) {
if (!success) {
reject(nil, @"The user name or passphrase you entered is not correct.", nil);
if (error) {
reject(nil, error.localizedDescription, error);
} else {
reject(nil, @"The user name or passphrase you entered is not correct.", nil);
}
return;
}

Expand Down

0 comments on commit 6bcbe71

Please sign in to comment.