Skip to content

Handle unavailable pages in Object Storage listings - #949

Open
pcbeingused33 wants to merge 1 commit into
linode:devfrom
pcbeingused33:fix/obj-page-out-of-range
Open

pcbeingused33 wants to merge 1 commit into
linode:devfrom
pcbeingused33:fix/obj-page-out-of-range

Conversation

@pcbeingused33

Copy link
Copy Markdown
Contributor

📝 Description

When obj ls or obj la requests the first page past the end of the results, the shared pagination helper exhausts the iterator while fetching the requested page and lets StopIteration escape. Handle exhaustion during that fetch the same way as during page skipping. With this change, both commands report “No result to show in this page.” and exit with REQUEST_FAILED.

✔️ How to Test

Run LINODE_CLI_TEST_MODE=1 XDG_CONFIG_HOME=$(mktemp -d) python -m pytest -q tests/unit/test_plugin_obj.py. The regression test checks that a one-page iterator returns page 1 and reports the expected error for page 2.

This change was prepared with AI assistance.

@pcbeingused33
pcbeingused33 requested review from a team as code owners December 3, 2026 22:48
@pcbeingused33
pcbeingused33 requested review from josephcardillo-akamai and psnoch-akamai and removed request for a team December 3, 2026 22:49

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant