Switch log messages to string literal
[e-mobility-charging-stations-simulator.git] / ui / web / src / composables / UIClient.ts
index cf9894009d8844b5f4879d44d899404052f0db1a..e78836fd51b7b18cdefa36b3f73c5a94e76ca191 100644 (file)
@@ -170,7 +170,7 @@ export default class UIClient {
     const response = JSON.parse(messageEvent.data) as ProtocolResponse;
 
     if (Array.isArray(response) === false) {
-      throw new Error('Response not an array: ' + JSON.stringify(response, null, 2));
+      throw new Error(`Response not an array: ${JSON.stringify(response, null, 2)}`);
     }
 
     const [uuid, responsePayload] = response;
@@ -188,7 +188,7 @@ export default class UIClient {
       }
       this.deleteResponseHandler(uuid);
     } else {
-      throw new Error('Not a response to a request: ' + JSON.stringify(response, null, 2));
+      throw new Error(`Not a response to a request: ${JSON.stringify(response, null, 2)}`);
     }
   }
 }