diff --git a/generic/models.py b/generic/models.py index c14ea5be..99ec9da4 100644 --- a/generic/models.py +++ b/generic/models.py @@ -783,10 +783,12 @@ class ExamOrCollectionGenericBase(models.Model, AuthorMixin): if self.start_date >= timezone.now() or ( self.end_date is not None and self.end_date <= timezone.now() ): - raise Http404("Exam not found") + # Raise with an explanatory message so the frontend can + # surface the reason to the end user. + raise Http404("Exam not currently available (outside allowed dates)") # If it is not active no one can take elif active_only and not self.active: - raise Http404("Exam not found") + raise Http404("Exam currently inactive") # If candidates only check they have access if self.candidates_only: