Repository navigation
graceful error handling - #405
Merged
Merged
Conversation
The Trino query and storage connections endpoints answered errors with
{error}, and the copy job endpoint with {status: 'not_found'}, while every
other route returns SvelteKit's App.Error ({message}). Use error() there
too and read the message on the client with a shared readErrorMessage
helper, so the Trino submit shows the server's reason again.
Errors outside the storage browser fell back to SvelteKit's unstyled default page. Add a shared ErrorPanel with a translated title and description per status, the request ID for unexpected errors, and links back to the dashboard or to retry. Server messages are not shown, since they may carry raw upstream details (#304). Unknown pages now render a 404 inside the app layout through a catch-all route, and unknown API paths answer with a JSON 404 instead of HTML. The auth guard no longer treats (app) routes as public because their path starts with a public prefix, so paths like /auth/login/x still require sign-in. src/error.html is a static fallback for errors thrown in hooks.
- Catalogue browser: show the server's message instead of the raw JSON body, and a translated message when the server cannot be reached. - Preview: the 403/404 messages were never shown, because the storage API already throws a StorageError for non-OK responses. Map the error code in the catch and drop the unreachable !res.ok branches, also in DirectoryDetails along with its unused message key. - directory-size: send the message of SvelteKit's HttpError, which is not an Error instance, instead of "Unknown error". - Storage layout: a failed bucket fetch for the active connection now shows an error above the connect form instead of silently looking disconnected. - Storage and settings connection actions return translated errors, and switching to a saved connection that fails now says why. The settings page shows action errors at all.
- readErrorMessage ignores 401s and unexpected errors, whose bodies only carry a generic English text, so callers fall back to translated messages. A failed directory size calculation and a failed preview download show translated messages too. - The auth guard matches public routes by route id instead of path prefix, so lookalike paths such as /metricsfoo require sign-in. - The root error page does not link failing sign-in pages to the dashboard, which would redirect straight back to sign-in. - ErrorPanel replaces StorageErrorPanel, with optional title, description and actions. - The 404 page uses "Page not found" as page title and heading. - Type the storage layout's buckets error reason.
# Conflicts: # e2e/storage/connection.spec.ts # messages/de.json # messages/en.json # src/routes/(app)/settings/connections/+page.server.ts # src/routes/(app)/settings/connections/+page.svelte # src/routes/(app)/storage/+page.server.ts # src/routes/(app)/storage/page.server.test.ts
# Conflicts: # src/lib/components/storage/shared/StorageErrorPanel.svelte
lfrancke
approved these changes
Oct 28, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
#359
Docs
Release note
Checklist
Author
Reviewer
Acceptance