diff --git a/packages/happy-app/sources/sync/apiSocket.ts b/packages/happy-app/sources/sync/apiSocket.ts index 7e64ae5835..6cfa718ecb 100644 --- a/packages/happy-app/sources/sync/apiSocket.ts +++ b/packages/happy-app/sources/sync/apiSocket.ts @@ -125,7 +125,7 @@ class ApiSocket { if (result.ok) { return await sessionEncryption.decryptRaw(result.result) as R; } - throw new Error('RPC call failed'); + throw new Error(`RPC call failed: ${result.error || 'unknown error'}`); } /** @@ -145,7 +145,7 @@ class ApiSocket { if (result.ok) { return await machineEncryption.decryptRaw(result.result) as R; } - throw new Error('RPC call failed'); + throw new Error(`RPC call failed: ${result.error || 'unknown error'}`); } send(event: string, data: any) {