8e7dcc2f62b3b64d9812e3ccbb1941b634973187
1 // Partial Copyright Jerome Benoit. 2021-2023. All Rights Reserved.
3 import BaseError from
'./BaseError';
4 import type { JsonType
} from
'../types/JsonType';
5 import { ErrorType
} from
'../types/ocpp/ErrorType';
6 import type { IncomingRequestCommand
, RequestCommand
} from
'../types/ocpp/Requests';
8 export default class OCPPError
extends BaseError
{
10 command
?: RequestCommand
| IncomingRequestCommand
;
16 command
?: RequestCommand
| IncomingRequestCommand
,
21 this.code
= code
?? ErrorType
.GENERIC_ERROR
;
22 this.command
= command
;
23 this.details
= details
?? {};