Skip to content

ValueError: Search API cursor pagination day is out of range for month #6269

@sentry-io

Description

@sentry-io

This error is quite weird. The cursor shows a request_date of 1990-08-32.

The request_date is extracted from the cursor or set using datetime.datetime.now().date() if it's the first page.

This could just be an isolated case where the user altered the cursor

Sentry Issue: COURTLISTENER-ATG

ValueError: day is out of range for month
(6 additional frame(s) were not displayed)
...
  File "cl/search/api_views.py", line 457, in list
    cd["request_date"] = paginator.initialize_context_from_request(
  File "cl/api/pagination.py", line 278, in initialize_context_from_request
    self.cursor = self.decode_cursor(request)
  File "cl/api/pagination.py", line 386, in decode_cursor
    datetime.date.fromisoformat(request_date) if request_date else None

Filed by @albertisfu

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions