From 59c2e7f7b7df95e3475f7ba6a0b3da2efc582dbd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Mon, 18 May 2026 15:09:24 +0200 Subject: [PATCH] Always process 503 and 401 HTTP errors Closes #14836 (grafted from aa6f099f2b3d4c2b90989240743554dd62500d9b) --HG-- branch : 8.0 --- sao/src/rpc.js | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/sao/src/rpc.js b/sao/src/rpc.js index 7c689b0d86..fa755c8857 100644 --- a/sao/src/rpc.js +++ b/sao/src/rpc.js @@ -119,11 +119,6 @@ }; var ajax_error = function(query, status_, error) { - if (!process_exception) { - console.debug(`RPC error calling ${args}: ${status_}: ${error}.`); - dfd.reject(); - return; - } if (query.status == 503) { this.retries++; if (this.retries < 5) { @@ -149,8 +144,7 @@ } return; } - } - if (query.status == 401) { + } else if (query.status == 401) { //Try to relog Sao.Session.renew(session).then(function() { if (async) { @@ -160,6 +154,10 @@ dfd.resolve(); } }, dfd.reject); + } else if (!process_exception) { + console.debug(`RPC error calling ${args}: ${status_}: ${error}.`); + dfd.reject(); + return; } else { var err_msg = `[${query.status}] ${error}`; Sao.common.message.run(