Firebase Cloud Function Error: Response is not valid JSON object.

Cing Sian Dal
Oct 7, 2020

Yes, your Response is not valid.

Because we’re sending in String like this:

response.send("Hello World");

So, be valid to your Response like this:

Send with some kinds of JSON object scheme:

response.send({
status: "success",
data: "your data object or string or any type"
});

Response with JSON Object.

--

--

Cing Sian Dal

Don’t follow me. I wrote junks here. Follow me on Twitter instead.