From 333b94f64eb0f9037f14f94cd411a2cbb8f3c1c2 Mon Sep 17 00:00:00 2001 From: Matthias Hochmeister Date: Mon, 30 Mar 2026 11:11:17 +0200 Subject: [PATCH] fix: read error message from ApiError.message instead of err.response in konto mutation onError --- frontend/src/pages/Buchhaltung.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/src/pages/Buchhaltung.tsx b/frontend/src/pages/Buchhaltung.tsx index 2aa5476..7393ba6 100644 --- a/frontend/src/pages/Buchhaltung.tsx +++ b/frontend/src/pages/Buchhaltung.tsx @@ -992,7 +992,7 @@ function KontenTab({ haushaltsjahre, selectedJahrId, onJahrChange }: { const createKontoMut = useMutation({ mutationFn: buchhaltungApi.createKonto, onSuccess: () => { qc.invalidateQueries({ queryKey: ['buchhaltung-konten'] }); qc.invalidateQueries({ queryKey: ['kontenTree'] }); setKontoDialog({ open: false }); showSuccess('Konto erstellt'); }, - onError: (err: any) => showError(err?.response?.data?.message || 'Konto konnte nicht erstellt werden'), + onError: (err: any) => showError(err?.message || err?.response?.data?.message || 'Konto konnte nicht erstellt werden'), }); const updateKontoMut = useMutation({ mutationFn: ({ id, data }: { id: number; data: Partial }) => buchhaltungApi.updateKonto(id, data),