Page MenuHomePhabricator

D11514.diff
No OneTemporary

D11514.diff

diff --git a/native/account/log-in-panel.react.js b/native/account/log-in-panel.react.js
--- a/native/account/log-in-panel.react.js
+++ b/native/account/log-in-panel.react.js
@@ -30,6 +30,7 @@
} from 'lib/types/account-types.js';
import type { IdentityAuthResult } from 'lib/types/identity-service-types.js';
import type { LoadingStatus } from 'lib/types/loading-types.js';
+import { getMessageForException } from 'lib/utils/errors.js';
import {
useDispatchActionPromise,
type DispatchActionPromise,
@@ -324,14 +325,18 @@
});
return result;
} catch (e) {
- if (e.message === 'user not found') {
+ const messageForException = getMessageForException(e);
+ if (
+ messageForException === 'user not found' ||
+ messageForException === 'login failed'
+ ) {
Alert.alert(
UserNotFoundAlertDetails.title,
UserNotFoundAlertDetails.message,
[{ text: 'OK', onPress: this.onUnsuccessfulLoginAlertAckowledged }],
{ cancelable: false },
);
- } else if (e.message === 'Unsupported version') {
+ } else if (messageForException === 'Unsupported version') {
Alert.alert(
AppOutOfDateAlertDetails.title,
AppOutOfDateAlertDetails.message,

File Metadata

Mime Type
text/plain
Expires
Tue, Dec 3, 1:40 PM (21 h, 50 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2611860
Default Alt Text
D11514.diff (1 KB)

Event Timeline