fix: show the server's error when user offboarding fails (#12069)

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Ruben Fiszel
2026-10-28 17:29:04 +01:00
committed by GitHub
co-authored by Claude Opus 5.5
parent 77c0a26515
commit 7765913064
2 changed files with 6 additions and 6 deletions
@@ -1,7 +1,7 @@
<script lang="ts">
import { Alert, Button } from '$lib/components/common'
import { fade } from 'svelte/transition'
import { classNames } from '$lib/utils'
import { apiErrorMessage, classNames } from '$lib/utils'
import { AlertTriangle, CornerDownLeft, Loader2 } from 'lucide-svelte'
import { UserService, FolderService } from '$lib/gen'
import type { WorkspaceOffboardPreview } from '$lib/gen'
@@ -99,7 +99,7 @@
wsConfigs[workspace_id] = config
}
} catch (e) {
sendUserToast('Failed to load offboard preview', true)
sendUserToast(`Failed to load offboard preview: ${apiErrorMessage(e)}`, true)
onClose()
} finally {
loading = false
@@ -180,7 +180,7 @@
onComplete()
}
} catch (e) {
sendUserToast(`Offboarding failed: ${e}`, true)
sendUserToast(`Offboarding failed: ${apiErrorMessage(e)}`, true)
} finally {
submitting = false
}
@@ -1,7 +1,7 @@
<script lang="ts">
import { Alert, Button } from '$lib/components/common'
import { fade } from 'svelte/transition'
import { classNames } from '$lib/utils'
import { apiErrorMessage, classNames } from '$lib/utils'
import { AlertTriangle, CornerDownLeft, Loader2 } from 'lucide-svelte'
import { UserService, FolderService } from '$lib/gen'
import type { OffboardPreview } from '$lib/gen/types.gen'
@@ -90,7 +90,7 @@
doReassign = false
}
} catch (e) {
sendUserToast('Failed to load offboard preview', true)
sendUserToast(`Failed to load offboard preview: ${apiErrorMessage(e)}`, true)
onClose()
} finally {
loading = false
@@ -128,7 +128,7 @@
onComplete()
}
} catch (e) {
sendUserToast(`Offboarding failed: ${e}`, true)
sendUserToast(`Offboarding failed: ${apiErrorMessage(e)}`, true)
} finally {
submitting = false
}