fix(ui): reject request promise if the UI server response is malformed
authorJérôme Benoit <jerome.benoit@sap.com>
Sun, 18 Feb 2024 19:50:50 +0000 (20:50 +0100)
committerJérôme Benoit <jerome.benoit@sap.com>
Sun, 18 Feb 2024 19:50:50 +0000 (20:50 +0100)
Signed-off-by: Jérôme Benoit <jerome.benoit@sap.com>
ui/web/src/composables/UIClient.ts

index 81a322d31c73d1d2a0222f2086fa6d498e796a22..e2266855de0fc18c65a90879cd8d586dafdb7ca4 100644 (file)
@@ -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)