Skip to content

Commit

Permalink
better handling of 4xx/5xx server responses when sending assemblies (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
adrianoc committed Feb 5, 2025
1 parent 7f5d7ce commit 5963e16
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Cecilifier.Web/wwwroot/js/cecilifier.assemblyreferences.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand All @@ -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.<br /><br />${this.responseText}`,
dismissible: true,
status: "Error",
timeout: 30000,
Expand Down

0 comments on commit 5963e16

Please sign in to comment.