harvard-lil / h2o

H2O is a web app for creating and reading open educational resources, primarily in the legal field
https://opencasebook.org
GNU Affero General Public License v3.0
36 stars 30 forks source link

EmptyPage exception when reading mode page crawled by bot #1991

Open sentry-io[bot] opened 1 year ago

sentry-io[bot] commented 1 year ago

This was only a bot access but the fact that it got here suggested there was a rendered next/previous link where there shouldn't have been.

Sentry Issue: H2O-9X

EmptyPage: That page contains no results
(3 additional frame(s) were not displayed)
...
  File "main/views.py", line 239, in wrapper
    return func(request, *args, **kwargs)
  File "django/utils/decorators.py", line 43, in _wrapper
    return bound_method(*args, **kwargs)
  File "main/views.py", line 2812, in as_printable_html
    page = paginator.page(page)
  File "django/core/paginator.py", line 76, in page
    number = self.validate_number(number)
  File "django/core/paginator.py", line 58, in validate_number
    raise EmptyPage(_('That page contains no results'))