Skip to content

refactor: fixed states import for errors and deleted stale files#1076

Open
mannat2634 wants to merge 1 commit intodoubtfire-lms:9.xfrom
mannat2634:migration/errors-coffee
Open

refactor: fixed states import for errors and deleted stale files#1076
mannat2634 wants to merge 1 commit intodoubtfire-lms:9.xfrom
mannat2634:migration/errors-coffee

Conversation

@mannat2634
Copy link

Description

Refactors error module imports by correcting the errors.states import and removing migrated/stale error files. This ensures unauthorised and timeout states load correctly after the errors migration and prevents module resolution errors.

Fixes # (issue)

Type of change

  • Bug fix (non-breaking change which fixes an issue)

How Has This Been Tested?

Manual testing was performed locally to verify unauthorised access handling and session timeout behaviour after the errors migration.

Test Steps

Prerequisites

  • User is logged in to Doubtfire
  • Application running at http://localhost:4200

Test 1: Unauthorised Access (Role-Based)

  1. Log in as a Student
  2. Navigate to /#/admin/institution-settings
  3. Confirm redirect to /unauthorised
  4. Verify warning card displays correct message and title
  5. Confirm no console errors related to doubtfire.errors or state loading

Test 3: Timeout State

  1. Log in as any user
  2. Navigate to /#/timeout
  3. Verify timeout page renders with correct message and icon
  4. Confirm automatic redirect to sign-in page after a few seconds

Testing Checklist:

  • Tested in latest Chrome
  • Tested in latest Safari
  • Tested in latest Firefox

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have requested a review from @macite and @jakerenzella on the Pull Request

@b0ink
Copy link
Member

b0ink commented Feb 4, 2026

timeout.coffee should probably be migrated first so that we can remove the errors coffeescript module all together

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants