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

feat: add page not found route #1514

Merged
merged 3 commits into from
Nov 12, 2024

Conversation

KristinAoki
Copy link
Member

Description

This PR replace the blank screen for invalid URLs with a header, footer, and page not found message. The page not found page also sends a logging error and tracking event so that redirects to invalid urls can be monitored and tracked.

Before

Screenshot 2024-11-07 at 4 29 08 PM

After

Screenshot 2024-11-07 at 4 19 52 PM

Supporting Information

JIRA Ticket: AU-1049 🔒

Due to MFEs' current client-side routing implementation, users just saw a blank page with a footer (ie, a “client-side 404”) instead of a true 404 page. The routing failures yielded a 200 OK page and are not reported to the server in any way, so no alerts are triggered. For contrast, 404s in Legacy LMS pages are logged and also share a more coherent story with users.

image

Testing

  1. Navigate to a course
  2. Change the URL to an invalid path
  3. Confirm that the PageNotFound component is displayed
  4. Click the homepage URL
  5. Confirm that it navigates back to the learner dashboard

Copy link

codecov bot commented Nov 7, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 89.25%. Comparing base (6534347) to head (bd95d78).
Report is 4 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1514      +/-   ##
==========================================
+ Coverage   89.23%   89.25%   +0.01%     
==========================================
  Files         317      318       +1     
  Lines        5557     5563       +6     
  Branches     1375     1341      -34     
==========================================
+ Hits         4959     4965       +6     
- Misses        582      583       +1     
+ Partials       16       15       -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@BrandonHBodine BrandonHBodine left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@KristinAoki KristinAoki merged commit 4da37f3 into master Nov 12, 2024
7 checks passed
@KristinAoki KristinAoki deleted the KristinAoki/add-generic-page-not-found branch November 12, 2024 14:05
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.

2 participants