Show backend error details in toast notifications
Use error.detail from API responses instead of generic i18n messages so users see specific reasons for failures (e.g. "Device is referenced by target(s): ..."). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -611,7 +611,7 @@ export async function deleteKCTarget(targetId) {
|
||||
if (typeof window.loadTargetsTab === 'function') window.loadTargetsTab();
|
||||
} else {
|
||||
const error = await response.json();
|
||||
showToast(t('kc_target.error.delete_failed'), 'error');
|
||||
showToast(error.detail || t('kc_target.error.delete_failed'), 'error');
|
||||
}
|
||||
} catch (error) {
|
||||
if (error.isAuth) return;
|
||||
|
||||
Reference in New Issue
Block a user