From 69c2ea904ff750cd714a3cf095adbb3a067b8790 Mon Sep 17 00:00:00 2001 From: Xylight Date: Sat, 29 Nov 2025 12:50:11 -0800 Subject: [PATCH] fix: wrap profile errors in errorMessage --- .github/README.md | 2 -- src/lib/app/auth.svelte.ts | 3 ++- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/README.md b/.github/README.md index 183bdf84..1f227cd6 100644 --- a/.github/README.md +++ b/.github/README.md @@ -8,7 +8,6 @@ - # Photon Photon is a web app for the fediverse with helpful features and a nice UX. @@ -90,7 +89,6 @@ Photon lets you configure the default client settings and more. If you're hosting Photon for a Lemmy instance, you'll almost definitely want to set these: - `PUBLIC_INSTANCE_URL` `string`: The domain which **the browser** will send API requests to. - - Example: `PUBLIC_INSTANCE_URL=fedi.phtn.app` - `PUBLIC_INSTANCE_TYPE` `lemmyv3 | piefedalpha` (default: `lemmyv3`): If your instance is running PieFed, you must set this option to `piefedalpha`. Otherwise, you don't need to do anything. diff --git a/src/lib/app/auth.svelte.ts b/src/lib/app/auth.svelte.ts index 65d35bc1..dee42aab 100644 --- a/src/lib/app/auth.svelte.ts +++ b/src/lib/app/auth.svelte.ts @@ -5,6 +5,7 @@ import { client, site } from '$lib/api/client.svelte' import type { Community, GetSiteResponse, MyUserInfo } from '$lib/api/types' import { publishedToDate } from '$lib/ui/util/date' import { toast } from 'mono-svelte' +import { errorMessage } from './error' import { t } from './i18n' import { DEFAULT_INSTANCE_URL } from './instance.svelte' import { instanceToURL, moveItem } from './util.svelte' @@ -228,7 +229,7 @@ class Profile { return user } catch (err) { toast({ - content: err as string, + content: errorMessage(err as string), type: 'error', }) return null