From 73ee02825f57d971f6f660fc5277d4aa268702ff Mon Sep 17 00:00:00 2001 From: nsfisis Date: Wed, 31 Dec 2025 19:39:47 +0900 Subject: fix(client): parse nested error object in API responses MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Server returns `{ error: { message, code } }` but client expected `{ error: string, code }`, causing "[object Object]" to display on login failure. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 --- src/client/api/client.test.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/client/api/client.test.ts') diff --git a/src/client/api/client.test.ts b/src/client/api/client.test.ts index 16deb28..5489547 100644 --- a/src/client/api/client.test.ts +++ b/src/client/api/client.test.ts @@ -85,8 +85,10 @@ describe("ApiClient", () => { { status: 401, body: { - error: "Invalid username or password", - code: "INVALID_CREDENTIALS", + error: { + message: "Invalid username or password", + code: "INVALID_CREDENTIALS", + }, }, }, ]); -- cgit v1.2.3-70-g09d2