forwardemail / forwardemail/superagent
Cannot catch error thrown by superagent
- Dominant language
- JavaScript
- Stars
- 16.6k
- Forks
- 1.3k
- PR merge metrics
- No merged PRs in 30d
Description
Occasionally, superagent throws error from deep inside, however, its not catchable and cause the app to crash. So, is there a solution for catching the error? Thanks!
For example, requesting below 2 links will cause superagent to crash.
target link: **https://umwelthotel.at/index.php?id=78** or **http://www.cargad.com/**
try {
let linkRes = await superagent.get(link).timeout({ response: 30000, deadline: 30000, }).set({"Accept-Encoding" : "gzip,deflate,sdch"});
if (linkRes && linkRes.text) { ..... }
} catch (err) {
// **can not catch the error**
}
**`Maybe the abnormal localtion setting in response is the root cause:`**


Contributor guide
Assessment
This issue has not been assessed yet.