about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/view/screens/Login.tsx7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/view/screens/Login.tsx b/src/view/screens/Login.tsx
index 328a56e9a..aca587286 100644
--- a/src/view/screens/Login.tsx
+++ b/src/view/screens/Login.tsx
@@ -20,6 +20,7 @@ import {makeValidHandle, createFullHandle, toNiceDomain} from '../lib/strings'
 import {useStores, DEFAULT_SERVICE} from '../../state'
 import {ServiceDescription} from '../../state/models/session'
 import {ServerInputModel} from '../../state/models/shell-ui'
+import {ComAtprotoAccountCreate} from '../../third-party/api/index'
 
 enum ScreenState {
   SigninOrCreateAccount,
@@ -326,7 +327,11 @@ const CreateAccount = ({onPressBack}: {onPressBack: () => void}) => {
         inviteCode,
       })
     } catch (e: any) {
-      const errMsg = e.toString()
+      let errMsg = e.toString()
+      if (e instanceof ComAtprotoAccountCreate.InvalidInviteCodeError) {
+        errMsg =
+          'Invite code not accepted. Check that you input it correctly and try again.'
+      }
       console.log(e)
       setIsProcessing(false)
       setError(errMsg.replace(/^Error:/, ''))