mirror of
https://github.com/zadam/trilium.git
synced 2025-12-23 08:39:57 +01:00
making sure that if AJAX request fails, then the whole operation is cancelled (previously the promise has been resolved successfully even in case of failed request)
This commit is contained in:
@@ -82,6 +82,8 @@ const server = (function() {
|
|||||||
|
|
||||||
return await $.ajax(options).catch(e => {
|
return await $.ajax(options).catch(e => {
|
||||||
showError("Error when calling " + method + " " + url + ": " + e.status + " - " + e.statusText);
|
showError("Error when calling " + method + " " + url + ": " + e.status + " - " + e.statusText);
|
||||||
|
|
||||||
|
throw e;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user