Skip to content

[PLT-4664] Raise ResourceNotFoundError when clearing reservations of a missing queue - #2090

Merged
Gabefire merged 1 commit into
developfrom
gu/plt-4664-clear-reservations-not-found
Oct 21, 2026
Merged

Gabefire merged 1 commit into
developfrom
gu/plt-4664-clear-reservations-not-found

Conversation

@Gabefire

@Gabefire Gabefire commented Oct 21, 2026 •

Copy link
Copy Markdown
Collaborator

Follow-up to #2087, fixing the Cursor Bugbot finding that was merged unaddressed.

Project.clear_queue_reservations documents ResourceNotFoundError when the task queue is not in the project. But client.execute returns None on a RESOURCE_NOT_FOUND GraphQL error unless raise_return_resource_not_found=True is passed, so indexing ["clearQueueReservations"] raised TypeError instead.

  • Pass raise_return_resource_not_found=True to execute, the same as client.py does for its own lookups.
  • Add a unit test for the not-found case.

Should land before the next SDK release, since #2087 is not in 7.16.0 yet.

🤖 Generated with Claude Code


Note

Low Risk
Narrow error-handling fix for one SDK method with a unit test; no auth, data, or API contract changes beyond matching documented exceptions.

Overview
Project.clear_queue_reservations now passes raise_return_resource_not_found=True into client.execute, so a missing or invalid task queue surfaces ResourceNotFoundError as documented instead of failing with a TypeError when the client returns None and the code indexes clearQueueReservations.

A unit test covers the not-found path and asserts the execute call uses that flag.

Reviewed by Cursor Bugbot for commit 2d6def3. Bugbot is set up for automated code reviews on this repo. Configure here.

…a missing queue

clear_queue_reservations documented ResourceNotFoundError for a queue not in
the project, but client.execute returns None on RESOURCE_NOT_FOUND by default,
so indexing the result raised TypeError instead.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Gabefire
Gabefire merged commit 1970c2c into develop Oct 21, 2026
14 of 24 checks passed
@Gabefire
Gabefire deleted the gu/plt-4664-clear-reservations-not-found branch October 21, 2026 15:12
@Gabefire Gabefire mentioned this pull request Oct 22, 2026

This branch was successfully deployed

1 active deployment
Test-PyPI — 2d6def38 Deployed Oct 21, 2026 by Gabefire via test-pypi #2557
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.

2 participants