mirror of
https://github.com/Foundry376/Mailspring.git
synced 2024-09-22 00:06:06 +08:00
[iso-core] Detect more offline errors when sending
Summary: See title. I really wish we could clean up this error handling a bit better, but I don't think its super important right now. Test Plan: manual Reviewers: spang, evan, halla Reviewed By: evan, halla Differential Revision: https://phab.nylas.com/D3903
This commit is contained in:
parent
85dc9f319e
commit
dbb404ccba
|
@ -50,7 +50,11 @@ class SendmailClient {
|
|||
throw new APIError('Sending failed - Invalid login', 401, {originalError: error})
|
||||
}
|
||||
|
||||
if (error.message.startsWith("getaddrinfo ENOTFOUND")) {
|
||||
if (error.message.includes("getaddrinfo ENOTFOUND")) {
|
||||
throw new APIError('Sending failed - Network Error', 401, {originalError: error})
|
||||
}
|
||||
|
||||
if (error.message.includes("connect ETIMEDOUT")) {
|
||||
throw new APIError('Sending failed - Network Error', 401, {originalError: error})
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue