1. A property or environment variable that does not exist
JSON.parse(event.body) when the request had no body, or JSON.parse(process.env.CONFIG) when the variable isn't set, both pass undefined. Check the value exists and fail with a message that names it.
const raw = process.env.FEATURE_FLAGS
if (raw === undefined) {
throw new Error('FEATURE_FLAGS is not set')
}
const flags = JSON.parse(raw)