Add friendly messages for unauthorized and unauthenticated errors

Purpose

This issue is to show a friendly message for unauthorized and unauthenticated errors.

CleanShot 2025-07-21 at 11.58.42.png

To recreate, simulate an expired access token scenario:

  • Access the unified purchase flow in a tab
  • Open another tab and sign out
  • On the first tab, without refreshing the page change the quantity

Proposal

Include error mapping for unauthorised and unauthenticated errors for unified purchase flow.

Assess whether the existing friendly messages for these errors can be used globally. If yes, add these error mappings to BASE_ERROR_DICTIONARY so they apply for the whole application.

While we're at this, look into extracting error mapping related constants out of app/frontend/javascripts/subscription/constants.js into a separate file (eg. error_dictionary.js) for better readability.

Edited Jul 21, 2025 by Vamsi Vempati
Assignee Loading
Time tracking Loading