rele icon indicating copy to clipboard operation
rele copied to clipboard

Catch PermissionDenied from create_subscription and continue to try t…

Open dolfandringa opened this issue 1 year ago • 0 comments

:tophat: What?

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

:thinking: 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)

:link: Related issue

Closes #262

dolfandringa avatar Oct 04 '23 14:10 dolfandringa