mirror of
https://github.com/windmill-labs/windmill.git
synced 2026-10-30 16:17:25 +00:00
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:
co-authored by
Claude Opus 5.5
parent
77c0a26515
commit
7765913064
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user