fix: odstranění matoucích chybových hlášek z dialogu Správa obchodů
CI / Generate TypeScript types (push) Successful in 10s
CI / Server unit tests (push) Successful in 26s
CI / Build server (push) Successful in 28s
CI / Build client (push) Successful in 41s
CI / Playwright E2E tests (push) Successful in 1m47s
CI / Build and push Docker image (push) Successful in 45s
CI / Notify (push) Successful in 2s

This commit is contained in:
mates committed 2026-08-25 11:49:18 +02:00
1 parent 6f6567a2a9
commit e5fc358c0a
3 files changed
+5 -4

No files matched your search

+2 -1
View File
@@ -31,7 +31,8 @@ getConfig().then(({ data }) => {
client.interceptors.response.use(async response => {
// TODO opravit - login je zatím výjimka, voláme ho "naprázdno" abychom zjistili, zda nás nepřihlásily trusted headers
if (!response.ok && !response.url.includes("/login")) {
const json = await response.json();
// Čteme z klonu, aby tělo odpovědi zůstalo k dispozici i generovanému SDK
const json = await response.clone().json();
toast.error(json.error, { theme: "colored" });
// Serverové chyby hlásíme do Sentry; 4xx jsou očekávané (chyby uživatele)
if (response.status >= 500) {