Statusphere, but in atcute and SvelteKit
atproto svelte sveltekit drizzle atcute typescript
19
fork

Configure Feed

Select the types of activity you want to include in your feed.

fix: show a better error for actor resolution failure

Mary acc7c057 395f3c03

+8
+8
src/lib/auth.remote.ts
··· 2 2 3 3 import * as v from 'valibot'; 4 4 5 + import { ActorResolutionError } from '@atcute/identity-resolver'; 5 6 import { isActorIdentifier, type ActorIdentifier } from '@atcute/lexicons/syntax'; 7 + import { OAuthResolverError } from '@atcute/oauth-node-client'; 6 8 7 9 import { form, getRequestEvent } from '$app/server'; 8 10 ··· 31 33 32 34 url = result.url; 33 35 } catch (err) { 36 + if (err instanceof OAuthResolverError) { 37 + if (err.cause instanceof ActorResolutionError) { 38 + invalid(`that identifier doesn't seem to be valid`); 39 + } 40 + } 41 + 34 42 console.error(`failed to authenticate ${identifier}:`, err); 35 43 36 44 invalid(`could not initiate login`);