notifications-node-client
notifications-node-client copied to clipboard
Assuming arguments are strings leads to crash
For example if a prototype kit user doesn't have an API key, they get this error
Cannot read properties of undefined (reading 'substring')
Because lines like this assume string:
https://github.com/alphagov/notifications-node-client/blob/main/client/api_client.js#L20
A more helpful error would be something like 'API key is required'