Skip to content

feat: error boundaries for landing and map pages#206

Open
benzy018 wants to merge 1 commit into
VertexChainLabs:mainfrom
benzy018:feat/error-boundaries-143
Open

feat: error boundaries for landing and map pages#206
benzy018 wants to merge 1 commit into
VertexChainLabs:mainfrom
benzy018:feat/error-boundaries-143

Conversation

@benzy018

Copy link
Copy Markdown
Contributor

Summary

Add Next.js App Router error.tsx files for the root and /map routes so any render-time exception shows a styled fallback with a "Try again" retry button instead of crashing the page.

Changes

File Purpose
Frontend/src/app/error.tsx Global error boundary (GlobalError) – catches errors in any route
Frontend/src/app/map/error.tsx Map-specific error boundary (MapError) – scoped fallback for the map page
Frontend/src/app/error.test.tsx 5 colocated Vitest tests for GlobalError
Frontend/src/app/map/error.test.tsx 6 colocated Vitest tests for MapError

Acceptance criteria

  • Throw a render-error in a test component → fallback renders (verified via Vitest with a mock error prop)
  • Fallback includes a styled "Try again" retry button that calls Next.js reset()
  • Dark theme (bg-[#111827]) and indigo accent (#6366f1) match project conventions
  • 11/11 tests pass (vitest run)

Testing

cd Frontend && npm ci && ./node_modules/.bin/vitest run src/app/error.test.tsx src/app/map/error.test.tsx
# Test Files  2 passed (2)
# Tests       11 passed (11)

Closes #143

Add Next.js App Router error.tsx files for the root and /map routes
so render-time exceptions show a styled fallback with a retry button
instead of crashing the page.

- Frontend/src/app/error.tsx       – global fallback (GlobalError)
- Frontend/src/app/map/error.tsx   – map-specific fallback (MapError)
- Colocated Vitest tests (11 tests, all passing)

Closes VertexChainLabs#143

Copy link
Copy Markdown
Contributor

The Soroban contracts CI job is failing \xe2\x9d\x97\xe2\x83\xa3 \xe2\x80\x94 could you check the workflow logs and push a fix? Once green, ready to merge!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Error boundaries for landing + map pages

2 participants