mirror of
https://github.com/zhigang1992/react-native-firebase.git
synced 2026-04-24 04:24:52 +08:00
[auth][android] update getJSError util regex to allow extracting codes from http errors - fixes #934
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user