Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve error handling in the UI #105

Merged
merged 2 commits into from
Sep 2, 2024
Merged

Improve error handling in the UI #105

merged 2 commits into from
Sep 2, 2024

Conversation

damianstasik
Copy link
Collaborator

@damianstasik damianstasik commented Aug 28, 2024

Fixes #96

I've used a small wrapper (ky) around fetch to unify HTTP response error handling. Whenever we receive a non-200 HTTP response, it throws an HTTPError that is caught by the error boundary around the routes. We can still display the 404 page by throwing a NotFoundPageError, for example, when requesting a non-existent submodule within an existing module's data.

I've also moved all routes under a route layout to use a single error boundary – I recommend disabling whitespace changes on the diff view.

Copy link

cloudflare-workers-and-pages bot commented Aug 29, 2024

Deploying registry-ui with  Cloudflare Pages  Cloudflare Pages

Latest commit: d2dd7b3
Status: ✅  Deploy successful!
Preview URL: https://431033ee.registry-ui-dxi.pages.dev
Branch Preview URL: https://improve-error-handling.registry-ui-dxi.pages.dev

View logs

@damianstasik damianstasik marked this pull request as ready for review August 29, 2024 17:33
@Yantrio Yantrio merged commit 6cd53da into main Sep 2, 2024
4 checks passed
@Yantrio Yantrio deleted the improve-error-handling branch September 2, 2024 13:20
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.

Invalid module/provider URL crashes UI
2 participants