mirror of
https://github.com/Foundry376/Mailspring.git
synced 2025-09-12 23:54:45 +08:00
fix(link/open tracking): Update error messages
This commit is contained in:
parent
5694b3e4fb
commit
ddb2de7b65
2 changed files with 5 additions and 5 deletions
|
@ -25,12 +25,12 @@ function afterDraftSend({message}) {
|
||||||
post({
|
post({
|
||||||
url: serverUrl,
|
url: serverUrl,
|
||||||
body: JSON.stringify(data),
|
body: JSON.stringify(data),
|
||||||
}).then( ([response, responseBody]) => {
|
}).then(([response, responseBody]) => {
|
||||||
if (response.statusCode !== 200) {
|
if (response.statusCode !== 200) {
|
||||||
throw new Error(`Link Tracking server error ${response.statusCode} at ${serverUrl}: ${responseBody}`);
|
throw new Error(`Server error ${response.statusCode} at ${serverUrl}: ${responseBody}`);
|
||||||
}
|
}
|
||||||
}).catch(error => {
|
}).catch(error => {
|
||||||
NylasEnv.showErrorDialog("There was a problem contacting the Link Tracking server! This message will not have link tracking");
|
NylasEnv.showErrorDialog(`There was a problem saving your link tracking settings. This message will not have link tracking. ${error.message}`);
|
||||||
Promise.reject(error);
|
Promise.reject(error);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
@ -29,10 +29,10 @@ function afterDraftSend({message}) {
|
||||||
body: JSON.stringify(data),
|
body: JSON.stringify(data),
|
||||||
}).then(([response, responseBody]) => {
|
}).then(([response, responseBody]) => {
|
||||||
if (response.statusCode !== 200) {
|
if (response.statusCode !== 200) {
|
||||||
throw new Error(responseBody);
|
throw new Error(`Server error ${response.statusCode} at ${serverUrl}: ${responseBody}`);
|
||||||
}
|
}
|
||||||
}).catch(error => {
|
}).catch(error => {
|
||||||
NylasEnv.showErrorDialog(`There was a problem saving your open tracking settings. This message will not have open tracking. ${error.message}`);
|
NylasEnv.showErrorDialog(`There was a problem saving your read receipt settings. This message will not have a read receipt. ${error.message}`);
|
||||||
Promise.reject(error);
|
Promise.reject(error);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue