notifications-node-client icon indicating copy to clipboard operation
notifications-node-client copied to clipboard

Assuming arguments are strings leads to crash

Open joelanman opened this issue 11 months ago • 0 comments

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'

joelanman avatar Feb 04 '25 17:02 joelanman