Combined with our development practice of only accessing config in global scope, this code will ensure that our smoke test catches missing config properties. OPTIONS requests will still fail, because the function using the missing variable will throw an error in global scope.
Failing fast makes smoke tests more effective. This is especially important in serverless setups: with a conventional server, it is easy to tell if a server is down. But with serverless, you need to check whether individual functions are down. And if a function fails fast when there’s some obvious devops error, smoke tests can catch the issue.