Given a Firebase Cloud Function, what's the proper way to fail an event (with the intention of retrying it) without causing a cold start?
This documentation suggests that unhandled errors cause cold starts. When using async functionality I'm assuming this applies to a rejected Promise as well.
throw new Error('I failed you'); // Will cause a cold start if not caught
Given that functions will often rely on third-party services that may not be 100% reliable, I don't want my functions to incur further penalties from cold starts due to transient downstream errors.
Is this even a recommended strategy? I'm using Firestore so I've considered storing retryable events in a temp collection that is scraped by a scheduled cloud function, but this seems unnecessarily complex.