Skip to content

Report render exceptions separately from data load failures#665

Merged
caufieldjh merged 1 commit into
mainfrom
issue-664-render-error
Jul 16, 2026
Merged

Report render exceptions separately from data load failures#665
caufieldjh merged 1 commit into
mainfrom
issue-664-render-error

Conversation

@caufieldjh

Copy link
Copy Markdown
Collaborator

Fixes #664.

Problem

loadRegistryData() wrapped both the fetch and the render in a single .catch(showLoadError), so any exception thrown while rendering successfully fetched data — including the deliberate "Registry data is missing its list of resources" guard — was presented to the user as a network load failure, with a Retry button that fails identically every time. This undercut the distinct error state introduced for #660/#661.

Fix

  • loadRegistryData() now uses the two-argument then(onFulfilled, onRejected) form: a rejected fetch goes to showLoadError as before, while onRegistryDataLoaded runs inside its own try/catch so render exceptions can no longer reach the load-error handler.
  • New showRenderError() shows a distinct alert: the data loaded, but an error occurred while displaying it, so retrying will not help. It includes the underlying error message and a "Report this problem" link to the issue tracker instead of a Retry button. Badges get the same error treatment as a load failure.

Verification

Exercised end-to-end in headless Chromium against the built site, using the reproduction from the issue:

  • Malformed data (HTTP 200, category is a number): shows "Could not display the registry data" with Details: r.category.toLowerCase is not a function and the report link; badges read — resources / — KGs. Previously this showed the load-failure banner.
  • Missing resources key (valid JSON): shows the display error with "Registry data is missing its list of resources".
  • 404 on both data URLs: still shows "Could not load the registry data" with the Retry button.
  • Real summary data: table renders normally (1012 resources / 153 KGs), no error state.

🤖 Generated with Claude Code

The catch in loadRegistryData() was attached after the render step, so
any exception thrown while rendering successfully fetched data was
reported to the user as a network load failure, complete with a Retry
button that could never help. This restores the confusion issue #660
set out to remove.

Split the two failure modes: a rejected fetch still shows the existing
load-error state, while an exception from onRegistryDataLoaded now shows
a distinct "loaded, but could not be displayed" alert that includes the
underlying error message and links to the issue tracker instead of
offering a pointless Retry.

Fixes #664

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@caufieldjh
caufieldjh merged commit e447de8 into main Jul 16, 2026
2 checks passed
@caufieldjh
caufieldjh deleted the issue-664-render-error branch July 16, 2026 02:31
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.

Render exceptions are reported to users as network load failures

1 participant