From b5a87f6a5472563963e3afb324b6d988e7919a93 Mon Sep 17 00:00:00 2001 From: Berenz <5912715+akberenz@users.noreply.github.com> Date: Thu, 11 Jul 2024 10:18:47 -0400 Subject: [PATCH] Carry out reject if signing is rejected --- js/qz-tray.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/js/qz-tray.js b/js/qz-tray.js index 4a31f5dc..96772c6c 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);