]> git.codecow.com Git - libnemo.git/commitdiff
Log cause of RPC failure.
authorChris Duncan <chris@codecow.com>
Tue, 4 Aug 2026 06:39:44 +0000 (23:39 -0700)
committerChris Duncan <chris@codecow.com>
Tue, 4 Aug 2026 06:39:44 +0000 (23:39 -0700)
src/lib/rpc/index.ts

index 2d1c1f42d9206c2d6459a548f62dc3f1c94c35f2..27edc3f6fd26e03e2a8e2b7f71cbecd6a7450af7 100644 (file)
@@ -47,7 +47,7 @@ export class Rpc {
                }
                const body = (data as Record<string, unknown>) ?? {}
                if ('action' in body && (typeof body.action !== 'string' || body.action.toLowerCase() !== action)) {
-                       throw new RangeError(`RPC post data contains 'action' property and does not match 'action' parameter argument. Do not include 'action' in request data.`)
+                       throw new RangeError(`RPC post data contains 'action' property and does not match 'action' parameter argument. Do not include 'action' in request data.`, { cause: body })
                }
                body.action = action