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