From: Jérôme Benoit Date: Sun, 18 Feb 2024 19:50:50 +0000 (+0100) Subject: fix(ui): reject request promise if the UI server response is malformed X-Git-Tag: v1.2.37~3 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=7c1d037fec161321b648cb5b9e0b106c2f0973e3;p=e-mobility-charging-stations-simulator.git fix(ui): reject request promise if the UI server response is malformed Signed-off-by: Jérôme Benoit --- diff --git a/ui/web/src/composables/UIClient.ts b/ui/web/src/composables/UIClient.ts index 81a322d3..e2266855 100644 --- a/ui/web/src/composables/UIClient.ts +++ b/ui/web/src/composables/UIClient.ts @@ -212,8 +212,10 @@ export class UIClient { reject(responsePayload) break default: - console.error( - `Response status for procedure '${procedureName}' not supported: '${responsePayload.status}'` + reject( + new Error( + `Response status for procedure '${procedureName}' not supported: '${responsePayload.status}'` + ) ) } this.responseHandlers.delete(uuid)