details:   https://code.tryton.org/tryton/commit/a837041f73e2
branch:    7.0
user:      Cédric Krier <[email protected]>
date:      Mon Nov 16 13:00:38 2026 +0100
description:
        Stop the login process when the response status is "too many request"

        Closes #15240
        (grafted from 5e13f6c2e3217e2f32e6dacfe2e7bef15a613d4a)
diffstat:

 sao/src/session.js             |  4 ++--
 tryton/tryton/common/common.py |  2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diffs (33 lines):

diff -r d816185f749e -r a837041f73e2 sao/src/session.js
--- a/sao/src/session.js        Wed Nov 18 12:14:50 2026 +0100
+++ b/sao/src/session.js        Mon Nov 16 13:00:38 2026 +0100
@@ -472,7 +472,7 @@
                     } else if (data.error[0].startsWith('429')) {
                         Sao.common.message.run(
                             Sao.i18n.gettext('Too many requests. Try again 
later.'),
-                            'tryton-error').always(dfd.resolve);
+                            'tryton-error').always(dfd.reject);
                     } else if (data.error[0].startsWith('404')) {
                         Sao.common.message.run(
                             Sao.i18n.gettext("Not found."),
@@ -502,7 +502,7 @@
                 } else if (query.status == 429) {
                     Sao.common.message.run(
                         Sao.i18n.gettext('Too many requests. Try again 
later.'),
-                        'tryton-error').always(dfd.resolve);
+                        'tryton-error').always(dfd.reject);
                 } else if (query.status == 404) {
                     Sao.common.message.run(
                         Sao.i18n.gettext("Not found."),
diff -r d816185f749e -r a837041f73e2 tryton/tryton/common/common.py
--- a/tryton/tryton/common/common.py    Wed Nov 18 12:14:50 2026 +0100
+++ b/tryton/tryton/common/common.py    Mon Nov 16 13:00:38 2026 +0100
@@ -1114,7 +1114,7 @@
                     message(
                         _('Too many requests. Try again later.'),
                         msg_type=Gtk.MessageType.ERROR)
-                    continue
+                    raise TrytonError('QueryCanceled')
                 elif (exception.faultCode
                         == str(int(HTTPStatus.NOT_FOUND))):
                     message(_("Not Found."), msg_type=Gtk.MessageType.ERROR)

Reply via email to