test: add tests for BaseError custom error
[e-mobility-charging-stations-simulator.git] / src / exception / OCPPError.ts
index 101bf5db1f16bda346626554f2e28c6f230818ed..41414fe9a8a04240bccf06f7a51a1417f29c3f19 100644 (file)
@@ -1,17 +1,12 @@
 // Partial Copyright Jerome Benoit. 2021-2024. All Rights Reserved.
 
 import { BaseError } from './BaseError.js'
-import {
-  type ErrorType,
-  type IncomingRequestCommand,
-  type JsonType,
-  type RequestCommand
-} from '../types/index.js'
+import type { ErrorType, IncomingRequestCommand, JsonType, RequestCommand } from '../types/index.js'
 import { Constants } from '../utils/index.js'
 
 export class OCPPError extends BaseError {
   code: ErrorType
-  command?: RequestCommand | IncomingRequestCommand
+  command: RequestCommand | IncomingRequestCommand
   details?: JsonType
 
   constructor (