mirror of
https://github.com/jupyterhub/jupyterhub.git
synced 2025-10-17 15:03:02 +00:00
warn about truncated replies without pagination
This commit is contained in:
@@ -57,6 +57,11 @@ class GroupListAPIHandler(_GroupAPIHandler):
|
||||
total_count = full_query.count()
|
||||
data = self.paginated_model(group_list, offset, limit, total_count)
|
||||
else:
|
||||
query_count = query.count()
|
||||
if offset == 0 and total_count > query_count:
|
||||
self.log.warning(
|
||||
f"Truncated group list in request that does not expect pagination. Replying with {query_count} of {total_count} total groups."
|
||||
)
|
||||
data = group_list
|
||||
self.write(json.dumps(data))
|
||||
|
||||
|
Reference in New Issue
Block a user