From: Chris Duncan Date: Wed, 5 Aug 2026 23:57:08 +0000 (-0700) Subject: Remove repetitive error cause, and do not replace with any other info which could... X-Git-Url: https://git.codecow.com/?a=commitdiff_plain;h=04e7272bf1ac1d24e4aa31179725a4e733d86331;p=libnemo.git Remove repetitive error cause, and do not replace with any other info which could be sensitive like API keys. --- diff --git a/src/lib/rpc/index.ts b/src/lib/rpc/index.ts index ddf82f6..c38c2ad 100644 --- a/src/lib/rpc/index.ts +++ b/src/lib/rpc/index.ts @@ -70,8 +70,7 @@ export class Rpc { const status = res.status const statusText = res.statusText ? ` ${res.statusText}` : '' if (status !== 200) { - const msg = `${status}${statusText}` - throw new Error(msg, { cause: msg }) + throw new Error(`${status}${statusText}`) } const resBody = await res.json() const code = resBody.code ? `${resBody.code} ` : ''