1 // Partial Copyright Jerome Benoit. 2021-2023. All Rights Reserved.
3 import { BaseError
} from
'./BaseError.js'
6 type IncomingRequestCommand
,
9 } from
'../types/index.js'
10 import { Constants
} from
'../utils/index.js'
12 export class OCPPError
extends BaseError
{
14 command
?: RequestCommand
| IncomingRequestCommand
20 command
?: RequestCommand
| IncomingRequestCommand
,
26 this.command
= command
?? (Constants
.UNKNOWN_COMMAND
as RequestCommand
| IncomingRequestCommand
)
27 this.details
= details