[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);
|
error.putString("nativeErrorCode", code);
|
||||||
message = authException.getMessage();
|
message = authException.getMessage();
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
Matcher matcher = Pattern.compile("\\[(.*):.*\\]").matcher(message);
|
Matcher matcher = Pattern.compile("([A-Z]*_[A-Z]*)").matcher(message);
|
||||||
if (matcher.find()) {
|
if (matcher.find()) {
|
||||||
code = matcher.group(1).trim();
|
code = matcher.group(1).trim();
|
||||||
switch (code) {
|
switch (code) {
|
||||||
|
|
Loading…
Reference in New Issue