Update index.js

You might not get a secret from session for example and then it fails silently.