issues
search
railsware
/
mailtrap-nodejs
Official mailtrap.io Node.js client
https://mailtrap.io
MIT License
58
stars
6
forks
source link
Show more information about connection errors
#9
Closed
leonid-shevtsov
closed
1 year ago
leonid-shevtsov
commented
1 year ago
Motivation
Changes
Introduce custom error class
Detect error response from the server better
In case response is not errors generated by our server (authentication, malformed request) - show network error message
Share
cause
for errors (works on Node 16 and above) that contains the underlying network error
Add test for error handling
Upgraded Typescript
How to test
[ ] Try sending without a valid token to see the server response (error with message = 'Unauthorized')
[ ] Try sending when network is down to see a network error
Motivation
Changes
cause
for errors (works on Node 16 and above) that contains the underlying network errorHow to test