Receive Clear Error Feedback When Enrollment Fails Due to Full Course or Unmet Prerequisites
The CourseEnrollmentService returns typed error states for two failure scenarios: full capacity and unmet prerequisites. The Enrollment Confirmation Screen surfaces these errors with distinct, human-readable messages rather than generic failure notices. For a full course, the message should indicate the course is at capacity and suggest checking back or contacting a coordinator. For unmet prerequisites, the message should name the specific missing prerequisite and, where possible, link to information about how to complete it. Both peer mentors (who may have limited digital literacy) and coordinators (who need to quickly diagnose issues for the mentors they support) benefit from explicit, non-technical error language.
User Story
Acceptance Criteria
- Given a user attempts to enroll in a course that is at full capacity, when the CourseEnrollmentService returns a full-capacity error, then a clear 'Course Full' message is shown explaining that no seats are available
- Given a user attempts to enroll in a course with unmet prerequisites, when the CourseEnrollmentService returns a prerequisite error, then the specific unmet prerequisite is named in the error message
- Given an enrollment error occurs, when the error state is displayed, then the user is not navigated away from the confirmation screen and can go back to the catalog without losing their place
- Given an enrollment error occurs, when displayed, then no partial enrollment record is written to the database
- Given a transient network error occurs during enrollment, when the error is caught, then a retry-friendly message is displayed rather than a permanent failure state
Business Value
Enrollment errors that produce vague failure messages generate coordinator support requests and erode trust in the digital enrollment process. For peer mentors with low digital confidence, unexplained errors often result in abandonment rather than retry. Typed error states with clear explanations eliminate this friction and reduce the administrative overhead on coordinators who otherwise field these questions directly. This is especially important for HLF where certification enrollment directly affects a mentor's active status and visibility on organizational listings.
Components
- Enrollment Confirmation Screen ui
- Course Enrollment Service service
- Course Repository data