Skip to content

Commit 06bfb79

Browse files
authored
Merge pull request mCodex#150 from appirio-digital/master
Returning getItem() error description to JS
2 parents 46ae4ff + 6bcbe71 commit 06bfb79

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

Diff for: ios/RNSensitiveInfo/RNSensitiveInfo.m

+5-1
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,11 @@ - (NSString *)messageForError:(NSError *)error
179179
localizedReason:prompt
180180
reply:^(BOOL success, NSError * _Nullable error) {
181181
if (!success) {
182-
reject(nil, @"The user name or passphrase you entered is not correct.", nil);
182+
if (error) {
183+
reject(nil, error.localizedDescription, error);
184+
} else {
185+
reject(nil, @"The user name or passphrase you entered is not correct.", nil);
186+
}
183187
return;
184188
}
185189

0 commit comments

Comments
 (0)