Response with error cloudfunction

Hi guys! how is it possible you can respond from a cloudfunction a state and a message, example in nodejs…

response.status(400).json({ message: ''error on query" })

it’s possible? Thanks!

I think that it is only possible to set a message, and not also a status code

1 Like

thanks for the reply…

And what response will be given to the request if the cloud function fails or there is an execution error?

I think that it will return a status code of error, but not something that you could control with a return

1 Like

great, thank you for your time and responses.