I've got a firebase function that seems to work correctly, but the logs indicate failure.
I'm seeing log messages like Function execution took xxx ms. Finished with status: response error.
Here's a screenshot of the logs when the HTTP function is triggered.
It's strange that the logging level is "Debug." None of the logger.error statements in the code are triggered.
The code itself is not complicated but even when I simplify it down to this, I'm seeing the error message in the logs.
export const shirtOrders = functions
.runWith({
timeoutSeconds: 300,
memory: "512MB",
})
.https.onRequest(async (request: any, response: any) => {
cors(request, response, async () => {
logger.info("Hello");
response.status(201).send(JSON.stringify({ result: "ok" }));
});
});
Does anyone have any suggestions for how to troubleshoot this?
