From 213804b9b6ea8b17f0bfb84db76852b4b6cc50e7 Mon Sep 17 00:00:00 2001 From: Alexander Onnikov Date: Mon, 13 Jan 2025 13:37:00 +0700 Subject: [PATCH] fix: reject query promise on error (#7650) Signed-off-by: Alexander Onnikov --- plugins/client-resources/src/connection.ts | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/plugins/client-resources/src/connection.ts b/plugins/client-resources/src/connection.ts index 2d31a789bf..64e921f851 100644 --- a/plugins/client-resources/src/connection.ts +++ b/plugins/client-resources/src/connection.ts @@ -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 }