intercom-node icon indicating copy to clipboard operation
intercom-node copied to clipboard

Better error handling of invalid search queries

Open colmdoyle opened this issue 2 years ago • 1 comments

See #344 for some context.

colmdoyle avatar Jan 30 '23 15:01 colmdoyle

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.

Alx101 avatar Feb 02 '23 16:02 Alx101