Skip to content

Commit

Permalink
fix: reject query promise on error (#7650)
Browse files Browse the repository at this point in the history
Signed-off-by: Alexander Onnikov <[email protected]>
  • Loading branch information
aonnikov authored Jan 13, 2025
1 parent ab28a62 commit 213804b
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion plugins/client-resources/src/connection.ts
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,14 @@ class Connection implements ClientConnection {
this.opt?.onArchived?.()
}
}
console.error(resp.error)

if (resp.id !== undefined) {
const promise = this.requests.get(resp.id)
if (promise !== undefined) {
promise.reject(new PlatformError(resp.error))
}
}

return
}

Expand Down

0 comments on commit 213804b

Please sign in to comment.