intercom-node
intercom-node copied to clipboard
Better error handling of invalid search queries
See #344 for some context.
Just recently ran into an issue because of this. Probably due to incorrect config, but any calls from the client fails with undefined error. After some digging it seems to be getting a 404 from the api, but because of this
https://github.com/intercom/intercom-node/blob/8e4f74acd6f8f9a9498edc0df861823f55c29b12/lib/client.ts#L249
the error is swallowed and completely hidden, at least a console.error or some specific error thrown would help for debugging.
Exceptions like these need to bubble up so it can be handled properly, and give some insight into what is wrong.