Skip to content

Commit

Permalink
add detail to error message for InvalidPageToken (#439)
Browse files Browse the repository at this point in the history
  • Loading branch information
tora-kozic committed Jul 7, 2022
1 parent b3c2a4c commit 9636d3a
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/py42/exceptions.py
Original file line number Diff line number Diff line change
Expand Up @@ -382,7 +382,13 @@ class Py42InvalidPageTokenError(Py42BadRequestError):
"""An error raised when the page token given is invalid."""

def __init__(self, exception, page_token):
message = f'Invalid page token: "{page_token}".'
message = (
f'Invalid page token: "{page_token}".\n'
"Page tokens match the last event ID received in a previous query. "
"Your page token may be invalid if the original query has changed "
"such that the corresponding event is being filtered out of the results, "
"or if the event has expired according to your data retention policy."
)
super().__init__(exception, message, page_token)
self._page_token = page_token

Expand Down

0 comments on commit 9636d3a

Please sign in to comment.