From 29b75d94378061b8f1ad5e54d29605a529f1e05a Mon Sep 17 00:00:00 2001 From: Berenz <5912715+akberenz@users.noreply.github.com> Date: Thu, 11 Jul 2024 11:10:14 -0400 Subject: [PATCH] Carry out reject if signing is rejected (#1274) --- js/qz-tray.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/js/qz-tray.js b/js/qz-tray.js index 4a31f5dce..96772c6cd 100644 --- a/js/qz-tray.js +++ b/js/qz-tray.js @@ -261,6 +261,13 @@ var qz = (function() { _qz.signContent = undefined; _qz.websocket.connection.send(_qz.tools.stringify(obj)); + }).catch(function(err) { + _qz.log.error("Signing failed", err); + + if (obj.promise != undefined) { + obj.promise.reject(new Error("Failed to sign request")); + delete _qz.websocket.pendingCalls[obj.uid]; + } }); } else { _qz.log.trace("Signature for call", obj.signature);