From 29a80b5a1db00b036281b738f04dbda11d7832a4 Mon Sep 17 00:00:00 2001 From: Chris Duncan Date: Tue, 4 Aug 2026 20:34:53 -0700 Subject: [PATCH] Simplify RPC error logging. --- src/lib/rpc/index.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/lib/rpc/index.ts b/src/lib/rpc/index.ts index fe3f3c2..ddf82f6 100644 --- a/src/lib/rpc/index.ts +++ b/src/lib/rpc/index.ts @@ -70,7 +70,8 @@ export class Rpc { const status = res.status const statusText = res.statusText ? ` ${res.statusText}` : '' if (status !== 200) { - throw new Error(`${status} ${statusText}`, { cause: JSON.stringify(res) }) + const msg = `${status}${statusText}` + throw new Error(msg, { cause: msg }) } const resBody = await res.json() const code = resBody.code ? `${resBody.code} ` : '' -- 2.52.0