You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was bitten by a bug where I expected a thrown err.message to exist, but it didn't since this library is throwing response objects rather than Error objects.
It's good practice to always throw Error objects (or a subclass of). This also applies to EventEmitter.emit('error', err). If you want to give the user access to additional properties you can always add those as properties of the error object.
The text was updated successfully, but these errors were encountered:
I was bitten by a bug where I expected a thrown
err.message
to exist, but it didn't since this library is throwing response objects rather than Error objects.It's good practice to always throw Error objects (or a subclass of). This also applies to
EventEmitter.emit('error', err)
. If you want to give the user access to additional properties you can always add those as properties of the error object.The text was updated successfully, but these errors were encountered: