fix: show what went wrong on canvas error screens - #379
Merged
Merged
Conversation
Contributor
|
🚀 Deployed on https://pr-379.event-visualizer.netlify.dhis2.org |
cooper-joe
requested changes
Sep 14, 2026
Co-authored-by: Joe Cooper <33054985+cooper-joe@users.noreply.github.com>
cooper-joe
self-requested a review
September 16, 2026 06:36
cooper-joe
previously approved these changes
Sep 16, 2026
Running the project formatter fixed a stray double-quoted string in error-codes.ts to match the single-quote convention. No test text mismatches resulted, since the formatting change didn't alter string content. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
pnpm test (vitest) doesn't run .cy.tsx Cypress component specs, so the error-screen copy update in this branch went unverified against them. Running pnpm cy:comp:run against this file surfaced two failing assertions still checking the old E7123 and E7128 description text. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
|
edoardo
approved these changes
Sep 17, 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.



Implements N/A
Description
Loading a non-existent visualization showed "Something went wrong" with a Retry that could never succeed — there was no not-found case in the error mapping.
Fixing that exposed a bigger problem. Analytics rejects a bad request with HTTP 409, and data-engine types 401, 403 and 409 alike as access. So every analytics code we had no specific error screen for told the user "Restricted access — contact a system administrator", sending them to their sysadmin over an app bug.
Changes
Unit tests cover the mapping; canvas-error.cy.tsx renders all 18 screens for visual review.
Quality checklist