Handle failed space auth

This commit is contained in:
Jon Staab
2024-11-18 20:31:17 -08:00
parent cbc4c524c4
commit ed738f64c8
4 changed files with 97 additions and 11 deletions
+7 -2
View File
@@ -330,10 +330,15 @@ export const checkRelayAuth = async (url: string, timeout = 3000) => {
}
export const attemptRelayAccess = async (url: string, claim = "") => {
const checks = [checkRelayProfile, checkRelayConnection, checkRelayAccess, checkRelayAuth]
const checks = [
() => checkRelayProfile(url),
() => checkRelayConnection(url),
() => checkRelayAccess(url, claim),
() => checkRelayAuth(url),
]
for (const check of checks) {
const error = await check(url)
const error = await check()
if (error) {
return error