Skip to content

Conversation

@dolfandringa
Copy link

@dolfandringa dolfandringa commented Oct 4, 2023

🎩 What?

Catch PermissionDenied and continue with updating the existing subscription if necessary.

🤔 Why?

If the subscription already exists (because it was pre-created) and the service account does not have roles/pubsub.editor permission at the project level, but does have role/pubsub.subscriber on the topic and subscription, the user is not allowed to create a subscription, and the current code will result in an error. Continuing from that error is totally fine though, if the user does have permission to consume the subscription, and update it (if necessary)

🔗 Related issue

Closes #262

…o update the existing subscription if necessary
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.

PermissionDeniedException raised when the subscription already exists and the user/service account doesn't have permission to create new ones

2 participants