Skip to content

fix(rw-backend): return 503 for storage errors#38

Merged
yumike merged 1 commit into
mainfrom
fix/propagate-storage-errors
Mar 24, 2026
Merged

fix(rw-backend): return 503 for storage errors#38
yumike merged 1 commit into
mainfrom
fix/propagate-storage-errors

Conversation

@yumike
Copy link
Copy Markdown
Contributor

@yumike yumike commented Mar 24, 2026

Summary

  • Adopt API changes from fix: propagate storage errors instead of returning empty site rw#238 where getNavigation() now throws on storage errors and renderPage() surfaces a distinct Storage error variant
  • Wrap getNavigation() calls to catch storage errors and return 503 (ServiceUnavailableError) instead of crashing with 500
  • Detect "Storage error" in renderPage() failures and return 503 instead of 500
  • Bump @rwdocs/core and @rwdocs/viewer to ^0.1.19

Test plan

  • Navigation endpoint returns 503 when getNavigation throws storage error
  • Pages endpoint returns 503 when renderPage throws storage error
  • Scope resolution returns 503 when getNavigation throws on scope lookup
  • All existing tests pass (yarn workspace @rwdocs/backstage-plugin-rw-backend run test --watchAll=false)
  • Typecheck and lint pass

🤖 Generated with Claude Code

Adopt changes from rwdocs/rw#238 where getNavigation() now throws on
storage errors and renderPage() surfaces a distinct Storage error variant.
Previously, misconfigured S3 or network failures would silently return
empty navigation — now they propagate as ServiceUnavailableError (503).

Also bumps @rwdocs/core and @rwdocs/viewer to ^0.1.19.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@yumike yumike force-pushed the fix/propagate-storage-errors branch from aab78a7 to 10154da Compare March 24, 2026 11:15
@yumike yumike merged commit 32abb77 into main Mar 24, 2026
1 check passed
@yumike yumike deleted the fix/propagate-storage-errors branch March 24, 2026 11:17
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