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 -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