diff options
| author | nsfisis <nsfisis@gmail.com> | 2025-12-31 19:39:47 +0900 |
|---|---|---|
| committer | nsfisis <nsfisis@gmail.com> | 2025-12-31 19:39:47 +0900 |
| commit | 73ee02825f57d971f6f660fc5277d4aa268702ff (patch) | |
| tree | 2e7ed277375674982f87d156dc6012a683f5fe2d /src/client/api/types.ts | |
| parent | f211ebcfac0a21e264b67c1226509896a11ed5ca (diff) | |
| download | kioku-73ee02825f57d971f6f660fc5277d4aa268702ff.tar.gz kioku-73ee02825f57d971f6f660fc5277d4aa268702ff.tar.zst kioku-73ee02825f57d971f6f660fc5277d4aa268702ff.zip | |
fix(client): parse nested error object in API responses
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 <noreply@anthropic.com>
Diffstat (limited to 'src/client/api/types.ts')
| -rw-r--r-- | src/client/api/types.ts | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/client/api/types.ts b/src/client/api/types.ts index d5df182..eaf69eb 100644 --- a/src/client/api/types.ts +++ b/src/client/api/types.ts @@ -10,8 +10,10 @@ export interface AuthResponse { } export interface ApiError { - error: string; - code?: string; + error: { + message: string; + code: string; + }; } export interface Tokens { |
