Skip to content

Build your personal knowledge base with Trilium Notes

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)

azivner35912f325b02
diff --git a/public/javascripts/server.js b/public/javascripts/server.js
index d5e452964a..82872f08c4 100644
--- a/public/javascripts/server.js
+++ b/public/javascripts/server.js
@@ -82,6 +82,8 @@ const server = (function() {
return await $.ajax(options).catch(e => {
showError("Error when calling " + method + " " + url + ": " + e.status + " - " + e.statusText);
+
+ throw e;
});
}