Add network map UX and theme support.
Introduce network map view/components with filtering and positioning, expand contacts/map backend fields and migrations, and add a persistent light/dark theme toggle with graph label color updates for readability. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
import { describe, it, expect } from 'vitest'
|
||||
import { normalizeApiError } from './errors'
|
||||
|
||||
describe('normalizeApiError', () => {
|
||||
it('extracts API message from response payload', () => {
|
||||
const err = normalizeApiError({ response: { status: 400, data: { error: 'Bad request' } } })
|
||||
expect(err.message).toBe('Bad request')
|
||||
expect(err.status).toBe(400)
|
||||
})
|
||||
|
||||
it('falls back to generic message', () => {
|
||||
const err = normalizeApiError({})
|
||||
expect(err.message.length).toBeGreaterThan(0)
|
||||
})
|
||||
})
|
||||
Reference in New Issue
Block a user