refactor: switch eslint configuration to strict type checking
[e-mobility-charging-stations-simulator.git] / src / charging-station / ocpp / OCPPRequestService.ts
index e78f71c56d1300137c12800c8f343e2a1ae9791c..1d698bd894fcaa6dd2d6194f77f0e036b8a19856 100644 (file)
@@ -454,7 +454,7 @@ export abstract class OCPPRequestService {
                 // Resolve response
                 resolve(messagePayload)
               }
-            } else if (error != null) {
+            } else {
               handleSendError(
                 new OCPPError(
                   ErrorType.GENERIC_ERROR,
@@ -483,7 +483,7 @@ export abstract class OCPPRequestService {
     }
     throw new OCPPError(
       ErrorType.SECURITY_ERROR,
-      `Cannot send command ${commandName} PDU when the charging station is in ${chargingStation?.bootNotificationResponse?.status} state on the central server`,
+      `Cannot send command ${commandName} PDU when the charging station is in ${chargingStation.bootNotificationResponse?.status} state on the central server`,
       commandName
     )
   }