Functions-samples: PubSub example missing return value

Created on 17 Oct 2018  路  2Comments  路  Source: firebase/functions-samples

Hello @nicolasgarnier

I just noticed that the PubSub example code has no return value. I think there should be a Promise returned, otherwise you get the following error on Stackdriver Logs: "Function returned undefined, expected Promise or value"

Most helpful comment

Thanks for the report! I've added some return null; in the sample

All 2 comments

Same here: Adding return 0; at the end of the function does not show the error message. See also discussion on Stackoverflow, specifically this comment:

From what I was told by the firebase support it sounds like things are going to remain this way.

Would you like a PR with the corresponding return statements added at the end of each method? Otherwise the current code produces errors.

Thanks for the report! I've added some return null; in the sample

Was this page helpful?
0 / 5 - 0 ratings

Related issues

kaceo picture kaceo  路  3Comments

tsaarikivi picture tsaarikivi  路  4Comments

beratuslu picture beratuslu  路  4Comments

Rovel picture Rovel  路  5Comments

inglesuniversal picture inglesuniversal  路  5Comments