I’ve setup a triggered function in Firebase using the onDocumentCreated trigger and noticed there is an option to set a boolean for retry. It is my assumption that this would result in a retry if the function throws an error. So I’ve setup the following test function and am running it with the local emulator. Unfortunately I have not been able to get the function to be called multiple times even though I see the error in the logs.
Is there another setting anywhere that I might be missing?
export const testRetries = onDocumentCreated(
{
document: "/testing/{test}",
retry: true,
},
async (event) => {
console.log("testRetries");
throw new Error("test error");
}
);
I tried running the above code in the emulator and am only seeing it triggered once and then never again.
Jeff is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.