1 // Partial Copyright Jerome Benoit. 2021. All Rights Reserved.
3 import { IncomingRequestCommand
, RequestCommand
} from
'../types/ocpp/Requests';
5 import BaseError from
'./BaseError';
6 import { ErrorType
} from
'../types/ocpp/ErrorType';
7 import { JsonType
} from
'../types/JsonType';
9 export default class OCPPError
extends BaseError
{
11 command
?: RequestCommand
| IncomingRequestCommand
;
17 command
?: RequestCommand
| IncomingRequestCommand
,
22 this.code
= code
?? ErrorType
.GENERIC_ERROR
;
23 this.command
= command
;
24 this.details
= details
?? {};