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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

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

Attention: Patch coverage is 0% with 6 lines in your changes missing coverage. Please review.

Project coverage is 89.14%. Comparing base (6534347) to head (2a29602).
Report is 3 commits behind head on master.

Files with missing lines Patch % Lines
src/generic/PageNotFound.jsx 0.00% 6 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1514      +/-   ##
==========================================
- Coverage   89.23%   89.14%   -0.10%     
==========================================
  Files         317      318       +1     
  Lines        5557     5563       +6     
  Branches     1375     1379       +4     
==========================================
  Hits         4959     4959              
- Misses        582      588       +6     
  Partials       16       16              

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

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.

1 participant