Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3382285
D12085.id40309.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
3 KB
Referenced Files
None
Subscribers
None
D12085.id40309.diff
View Options
diff --git a/native/account/registration/registration-server-call.js b/native/account/registration/registration-server-call.js
--- a/native/account/registration/registration-server-call.js
+++ b/native/account/registration/registration-server-call.js
@@ -266,12 +266,22 @@
urlPrefixOverride: keyserverURL,
});
} catch (e) {
- Alert.alert(
- UnknownErrorAlertDetails.title,
- UnknownErrorAlertDetails.message,
- [{ text: 'OK', onPress: onAlertAcknowledged }],
- { cancelable: !onAlertAcknowledged },
- );
+ const messageForException = getMessageForException(e);
+ if (messageForException === 'client_version_unsupported') {
+ Alert.alert(
+ AppOutOfDateAlertDetails.title,
+ AppOutOfDateAlertDetails.message,
+ [{ text: 'OK', onPress: onAlertAcknowledged }],
+ { cancelable: !onAlertAcknowledged },
+ );
+ } else {
+ Alert.alert(
+ UnknownErrorAlertDetails.title,
+ UnknownErrorAlertDetails.message,
+ [{ text: 'OK', onPress: onAlertAcknowledged }],
+ { cancelable: !onAlertAcknowledged },
+ );
+ }
throw e;
}
} else {
@@ -286,6 +296,13 @@
const messageForException = getMessageForException(e);
if (messageForException === 'nonce expired') {
onNonceExpired();
+ } else if (messageForException === 'Unsupported version') {
+ Alert.alert(
+ AppOutOfDateAlertDetails.title,
+ AppOutOfDateAlertDetails.message,
+ [{ text: 'OK', onPress: onAlertAcknowledged }],
+ { cancelable: !onAlertAcknowledged },
+ );
} else {
Alert.alert(
UnknownErrorAlertDetails.title,
@@ -409,15 +426,27 @@
reject,
});
} catch (keyserverAuthException) {
+ const messageForException = getMessageForException(
+ keyserverAuthException,
+ );
const discardIdentityAccountPromise = (async () => {
try {
const deletionResult = await deleteDiscardedIdentityAccount();
- Alert.alert(
- UnknownErrorAlertDetails.title,
- UnknownErrorAlertDetails.message,
- [{ text: 'OK', onPress: onAlertAcknowledged }],
- { cancelable: !onAlertAcknowledged },
- );
+ if (messageForException === 'client_version_unsupported') {
+ Alert.alert(
+ AppOutOfDateAlertDetails.title,
+ AppOutOfDateAlertDetails.message,
+ [{ text: 'OK', onPress: onAlertAcknowledged }],
+ { cancelable: !onAlertAcknowledged },
+ );
+ } else {
+ Alert.alert(
+ UnknownErrorAlertDetails.title,
+ UnknownErrorAlertDetails.message,
+ [{ text: 'OK', onPress: onAlertAcknowledged }],
+ { cancelable: !onAlertAcknowledged },
+ );
+ }
return deletionResult;
} catch (deleteException) {
Alert.alert(
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Nov 29, 9:39 AM (20 h, 47 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2596585
Default Alt Text
D12085.id40309.diff (3 KB)
Attached To
Mode
D12085: [native] Handle client version unsupported errors in registrationServerCall
Attached
Detach File
Event Timeline
Log In to Comment