[auth][android] update getJSError util regex to allow extracting codes from http errors - fixes #934
This commit is contained in:
parent
f13a2b5f9c
commit
c185b3b060
|
@ -1327,7 +1327,7 @@ class RNFirebaseAuth extends ReactContextBaseJavaModule {
|
|||
error.putString("nativeErrorCode", code);
|
||||
message = authException.getMessage();
|
||||
} catch (Exception e) {
|
||||
Matcher matcher = Pattern.compile("\\[(.*):.*\\]").matcher(message);
|
||||
Matcher matcher = Pattern.compile("([A-Z]*_[A-Z]*)").matcher(message);
|
||||
if (matcher.find()) {
|
||||
code = matcher.group(1).trim();
|
||||
switch (code) {
|
||||
|
|
Loading…
Reference in New Issue