Skip to content

Commit 6bcbe71

Browse files
authored
Returning getItem() error description to JS
1 parent 46ae4ff commit 6bcbe71

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

ios/RNSensitiveInfo/RNSensitiveInfo.m

Lines changed: 5 additions & 1 deletion
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)