Require unique hostname for Wallet Connections; add conflict validation and UI guidance

This commit is contained in:
copilot-swe-agent[bot]
2026-07-27 11:36:02 +00:00
committed by GitHub
parent 007bf1a4ce
commit 768f26027e
4 changed files with 634 additions and 11 deletions
+10 -1
View File
@@ -55,7 +55,16 @@ async function apiFetch(path, options) {
const res = await fetch(path, options || {});
if (!res.ok) {
let detail = res.status + " " + res.statusText;
try { const body = await res.json(); if (body && body.detail) detail = body.detail; } catch (e) {}
try {
const body = await res.json();
if (body && body.detail) {
if (typeof body.detail === "string") {
detail = body.detail;
} else if (body.detail && typeof body.detail.message === "string") {
detail = body.detail.message;
}
}
} catch (e) {}
throw new Error(detail);
}
return res.json();