Open
Description
Which sample has a bug?
Create Stripe customers and charge them on Firestore write
How to reproduce the issue
- Deploy code with node runtime later than node 8
- Execute code in a manner that will log an error
- Observe that "FUNCTION_NAME" will be undefined
Why? Because once cloud functions moved beyond Node 8, the environment variables that are exposed changed. This should now be FUNCTION_TARGET
as defined here: https://cloud.google.com/functions/docs/configuring/env-var#newer_runtimes
Debug output
Screenshots
Expected behavior
Expect the cloud function name to be shown, but FUNCTION_NAME
is not a valid env var after node 8.
Actual behavior
The name of the cloud function is undefined