mirror of
https://github.com/keepassxreboot/keepassxc-browser.git
synced 2026-03-11 08:54:43 +00:00
Handle errors properly
This commit is contained in:
parent
bfd6988240
commit
5859f15c44
1 changed files with 1 additions and 1 deletions
|
|
@ -83,7 +83,7 @@ keepassClient.sendNativeMessage = function(request, enableTimeout = false, timeo
|
|||
const handler = (msg) => {
|
||||
if (msg && msg?.action === action) {
|
||||
// If the request has a separate requestID, check if it matches when there's no nonce (an error message)
|
||||
const isNotificationOrError = !msg.nonce && request.requestID === msg.requestID;
|
||||
const isNotificationOrError = !msg.nonce && (request.requestID === msg.requestID || (msg.error && msg.errorCode));
|
||||
|
||||
// Only resolve a matching response or a notification (without nonce)
|
||||
if (isNotificationOrError || messageBuffer.matchAndRemove(msg)) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue