From 267ffc4ed94782792e4e44785bdc802aa37f02d7 Mon Sep 17 00:00:00 2001 From: Vassiliy Yegorov Date: Fri, 3 Jul 2026 17:19:51 +0700 Subject: [PATCH] =?UTF-8?q?fix(web):=20Domain.templateId=20=D0=BE=D0=BF?= =?UTF-8?q?=D1=86=D0=B8=D0=BE=D0=BD=D0=B0=D0=BB=D0=B5=D0=BD=20(Go=20omitem?= =?UTF-8?q?pty),=20String()=20=D0=BD=D0=B0=20error?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Opus 4.8 (1M context) --- web/src/api/client.ts | 2 +- web/src/api/types.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/web/src/api/client.ts b/web/src/api/client.ts index 4d5d65b..771dbce 100644 --- a/web/src/api/client.ts +++ b/web/src/api/client.ts @@ -12,7 +12,7 @@ async function req(path: string, init?: RequestInit): Promise { }) if (!res.ok) { let msg = `HTTP ${res.status}` - try { const b = await res.json(); if (b?.error) msg = b.error } catch { /* ignore */ } + try { const b = await res.json(); if (b?.error) msg = String(b.error) } catch { /* ignore */ } throw new Error(msg) } if (res.status === 204) return undefined as T diff --git a/web/src/api/types.ts b/web/src/api/types.ts index 853ce75..04e8ffe 100644 --- a/web/src/api/types.ts +++ b/web/src/api/types.ts @@ -10,7 +10,7 @@ export interface Domain { providerAccountId: string zoneName: string zoneId: string - templateId: string | null + templateId?: string | null // Go omitempty: поле может отсутствовать (undefined), а не null } export interface CreateDomainInput { providerAccountId: string