Skip to content

fix(rw-backend): use @backstage/errors for structured error handling#13

Merged
yumike merged 1 commit into
mainfrom
fix/use-backstage-errors
Mar 2, 2026
Merged

fix(rw-backend): use @backstage/errors for structured error handling#13
yumike merged 1 commit into
mainfrom
fix/use-backstage-errors

Conversation

@yumike
Copy link
Copy Markdown
Contributor

@yumike yumike commented Mar 2, 2026

Summary

  • Replace manual res.status().json() error responses with InputError and NotFoundError from @backstage/errors, letting Backstage's error middleware handle status codes consistently
  • Add 9 unit tests for all router endpoints (/health, /config, /navigation, /pages) including error cases (path traversal, not found, render failure)
  • Add test step to Makefile and CI workflow

Test plan

  • All 9 router tests pass locally
  • CI passes on PR

🤖 Generated with Claude Code

Replace manual res.status().json() error responses with InputError and
NotFoundError from @backstage/errors. Add 9 unit tests covering all
router endpoints (health, config, navigation, pages) including error
cases. Add test step to Makefile and CI.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@yumike yumike force-pushed the fix/use-backstage-errors branch from 3e7e8ce to 305859b Compare March 2, 2026 08:55
@yumike yumike merged commit a8b966e into main Mar 2, 2026
1 check passed
@yumike yumike deleted the fix/use-backstage-errors branch March 2, 2026 09:03
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.

1 participant