misc: tweak error messages for login
This commit is contained in:
1 parent
5a8499fd7b
commit
1aed9b3e48
2 files changed
+5
-5
No files matched your search
+2
-2
@@ -222,7 +222,7 @@ export async function setUser(jwt: string, inst: string, username?: string) {
|
||||
})
|
||||
if (!user?.user) {
|
||||
toast({
|
||||
content: 'Failed to fetch your user.',
|
||||
content: 'Your instance\'s API did not return your user data.',
|
||||
type: 'error',
|
||||
})
|
||||
}
|
||||
@@ -269,7 +269,7 @@ async function userFromJwt(
|
||||
const site = await sitePromise.then((r) => {
|
||||
clearTimeout(timer)
|
||||
return r
|
||||
}).catch((e) => { toast({ content: `Failed to load user data. ${e}` }) })
|
||||
}).catch((e) => { toast({ content: `Failed to contact the instance. ${e}` }) })
|
||||
|
||||
if (!site) return
|
||||
|
||||
|
||||
@@ -34,9 +34,9 @@
|
||||
|
||||
try {
|
||||
data.instance = data.instance.trim()
|
||||
if (!(await validateInstance(data.instance))) {
|
||||
throw new Error('Failed to contact that instance. Is it down?')
|
||||
}
|
||||
// if (!(await validateInstance(data.instance))) {
|
||||
// throw new Error('Failed to contact that instance. Is it down?')
|
||||
// }
|
||||
|
||||
const response = await getClient(data.instance).login({
|
||||
username_or_email: data.username.trim(),
|
||||
|
||||
Reference in new issue
Block a user