// Partial Copyright Jerome Benoit. 2021. All Rights Reserved.
+import { JsonType } from '../types/JsonType';
+import { ErrorType } from '../types/ocpp/ErrorType';
import { IncomingRequestCommand, RequestCommand } from '../types/ocpp/Requests';
-
import BaseError from './BaseError';
-import { ErrorType } from '../types/ocpp/ErrorType';
-import { JsonType } from '../types/JsonType';
export default class OCPPError extends BaseError {
- code: ErrorType | IncomingRequestCommand;
+ code: ErrorType;
command?: RequestCommand | IncomingRequestCommand;
details?: JsonType;
constructor(
- code: ErrorType | IncomingRequestCommand,
+ code: ErrorType,
message: string,
command?: RequestCommand | IncomingRequestCommand,
details?: JsonType