Skip to content

fix(cleanrooms): read the lowercase error key when wait_query fails - #3577

Open
abhishekacharya200 wants to merge 1 commit into
aws:mainfrom
abhishekacharya200:fix/cleanrooms-error-key
Open

abhishekacharya200 wants to merge 1 commit into
aws:mainfrom
abhishekacharya200:fix/cleanrooms-error-key

Conversation

@abhishekacharya200

Copy link
Copy Markdown
Contributor

Feature or Bugfix

  • Bugfix

Detail

  • cleanrooms.wait_query raised QueryFailed with response["protectedQuery"].get("Error"). The Clean Rooms GetProtectedQuery response uses a lowercase error key (a structure with message and code), so the exception message was always None. It now reads error.message.
  • Added a mocked unit test (tests/unit/test_cleanrooms_mocked.py) that fails before the change and passes after.

Relates

  • None

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

GetProtectedQuery returns the failure details under protectedQuery.error.message, but wait_query looked up the capitalised Error key, so QueryFailed was always raised with None. Read error.message instead.
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