8000 fix GetTopicAttributes exception when arn is malformed by bentsku · Pull Request #9310 · localstack/localstack · GitHub
[go: up one dir, main page]

Skip to content

fix GetTopicAttributes exception when arn is malformed #9310

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 7, 2023

Conversation

bentsku
Copy link
Contributor
@bentsku bentsku commented Oct 6, 2023

Motivation

As reported in #9306, we would raise a 500 when the topic is not a properly formed ARN. This exception comes from moto, and should be handled there as well. In the meantime, we can fix it with our utils.

Changes

Moved up our method to get the topic, which will raise the proper exception if there's an issue before calling moto. Added a test with a malformed arn to validated the behaviour.

@bentsku bentsku added aws:sns Amazon Simple Notification Service semver: patch Non-breaking changes which can be included in patch releases labels Oct 6, 2023
@bentsku bentsku requested a review from viren-nadkarni October 6, 2023 17:17
@bentsku bentsku self-assigned this Oct 6, 2023
@bentsku bentsku requested a review from thrau as a code owner October 6, 2023 17:17
@coveralls
Copy link

Coverage Status

coverage: 83.035% (+0.003%) from 83.032% when pulling c72dc35 on fix-sns-get-attrs into e7ddddd on master.

@github-actions
Copy link
github-actions bot commented Oct 6, 2023

LocalStack Community integration with Pro

       2 files         2 suites   1h 9m 10s ⏱️
2 243 tests 1 741 ✔️ 502 💤 0
2 244 runs  1 741 ✔️ 503 💤 0

Results for commit c72dc35.

Copy link
Member
@thrau thrau left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@thrau thrau merged commit 106f5e0 into master Oct 7, 2023
@thrau thrau deleted the fix-sns-get-attrs branch October 7, 2023 09:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
aws:sns Amazon Simple Notification Service semver: patch Non-breaking changes which can be included in patch releases
Projects
None yet
Development

Successfully merging this pull request may close these issues.

bug: "exception while calling sns.GetTopicAttributes: not enough values to unpack" when trying to get attributes of topic that does not exist
3 participants
0