From 5963e16febf4c1313346a274dd219ef544e38f29 Mon Sep 17 00:00:00 2001 From: Adriano Carlos Verona Date: Tue, 4 Feb 2025 20:47:13 -0500 Subject: [PATCH] better handling of 4xx/5xx server responses when sending assemblies (#327) --- Cecilifier.Web/wwwroot/js/cecilifier.assemblyreferences.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Cecilifier.Web/wwwroot/js/cecilifier.assemblyreferences.js b/Cecilifier.Web/wwwroot/js/cecilifier.assemblyreferences.js index 10b611f2..f990c450 100644 --- a/Cecilifier.Web/wwwroot/js/cecilifier.assemblyreferences.js +++ b/Cecilifier.Web/wwwroot/js/cecilifier.assemblyreferences.js @@ -177,7 +177,7 @@ function sendMissingAssemblyReferences(missingAssemblyHashes, continuation) { getAssemblyReferencesContents(missingAssemblyHashes, function (missingAssemblies) { const xhttp = new XMLHttpRequest(); xhttp.onreadystatechange = function() { - if (this.readyState !== 4) + if (this.readyState !== this.DONE) return; if (this.status === 200) { @@ -194,7 +194,7 @@ function sendMissingAssemblyReferences(missingAssemblyHashes, continuation) { } else if (this.status !== 0) { SnackBar({ - message: `Error code ${this.status} : ${this.statusText}`, + message: `Error sending assemblies to cecilifier server.

${this.responseText}`, dismissible: true, status: "Error", timeout: 30000,