1 // Partial Copyright Jerome Benoit. 2021-2024. All Rights Reserved.
3 import type { ErrorType
, IncomingRequestCommand
, JsonType
, RequestCommand
} from
'../types/index.js'
4 import { Constants
} from
'../utils/index.js'
5 import { BaseError
} from
'./BaseError.js'
7 export class OCPPError
extends BaseError
{
9 command
: RequestCommand
| IncomingRequestCommand
15 command
?: RequestCommand
| IncomingRequestCommand
,
21 this.command
= command
?? Constants
.UNKNOWN_OCPP_COMMAND
22 this.details
= details