Reputation: 143
I'm using Cloud Run that is getting triggered by a pubsub message. But when this Cloud Run code gets an error it does re-run the application over and over again. This seems unnecessary now when testing because I see the error in the log and doesn't need the code to re-run.
Where can I turn this off? I'm using Node JS.
Upvotes: 1
Views: 1299
Reputation: 143
Solved it short term by enclosing the whole code block by a try/catch and then always be sure to a throw err to catch the error.
After that instead of returning a 400 status in the catch block I returned 200 and the pubsub message got ack:ed that everything was working (Even if it did not).
Upvotes: 2
Reputation: 75980
You can purge your PubSub push subscription, or delete it.
Upvotes: 4