build: align eslint imports sorting settings
[e-mobility-charging-stations-simulator.git] / ui / web / src / composables / UIClient.ts
index cf9894009d8844b5f4879d44d899404052f0db1a..f7fc9052c96173ed9ae636ff9f513881573ca6ab 100644 (file)
@@ -1,7 +1,11 @@
-import { ProcedureName, ResponseStatus, type RequestPayload } from '@/types/UIProtocol';
-import type { ProtocolResponse, ResponsePayload } from '@/types/UIProtocol';
-
 import Utils from './Utils';
+import {
+  ProcedureName,
+  type ProtocolResponse,
+  type RequestPayload,
+  type ResponsePayload,
+  ResponseStatus,
+} from '@/types/UIProtocol';
 import config from '@/assets/config';
 
 type ResponseHandler = {
@@ -170,7 +174,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 +192,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)}`);
     }
   }
 }