1 // Partial Copyright Jerome Benoit. 2021-2023. All Rights Reserved.
3 import { BaseError
} from
'./BaseError';
6 type IncomingRequestCommand
,
10 import { Constants
} from
'../utils';
12 export class OCPPError
extends BaseError
{
14 command
?: RequestCommand
| IncomingRequestCommand
;
20 command
?: RequestCommand
| IncomingRequestCommand
,
25 this.code
= code
?? ErrorType
.GENERIC_ERROR
;
26 this.command
= command
;
27 this.details
= details
?? Constants
.EMPTY_FROZEN_OBJECT
;