mirror of
https://github.com/windmill-labs/windmill.git
synced 2026-09-21 00:02:30 +00:00
fix(settings): show the server's reason when saving instance settings fails
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5
parent
489493dba2
commit
947e44fe49
@@ -49,7 +49,11 @@
|
||||
})
|
||||
.catch((error) => {
|
||||
console.error('Save failed:', error)
|
||||
sendUserToast(error?.message ?? 'Save failed', true)
|
||||
// An ApiError's message is only the HTTP status text; the server's reason is its body.
|
||||
sendUserToast(
|
||||
(typeof error?.body === 'string' && error.body) || error?.message || 'Save failed',
|
||||
true
|
||||
)
|
||||
saveStatus = 'error'
|
||||
statusTimeout = setTimeout(() => {
|
||||
saveStatus = null
|
||||
|
||||
Reference in New Issue
Block a user