fix: wrap profile errors in errorMessage

This commit is contained in:
Xylight committed 2025-11-29 12:50:11 -08:00
1 parent b8e68bfdb0
commit 69c2ea904f
2 files changed
+2 -3

No files matched your search

-2
View File
@@ -8,7 +8,6 @@
<img src="https://github.com/user-attachments/assets/11cf24c2-fd4f-480a-8a16-41f0f0a5b245">
</picture>
# 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.
+2 -1
View File
@@ -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