repositories
/
e-mobility-charging-stations-simulator.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Apply dependencies update
[e-mobility-charging-stations-simulator.git]
/
src
/
exception
/
OCPPError.ts
diff --git
a/src/exception/OCPPError.ts
b/src/exception/OCPPError.ts
index cfcc4f40c8dacc0c6eefcd07e71706877cbb3c01..e67f3c95f56c38b81a22e1c70a1be191199e610c 100644
(file)
--- a/
src/exception/OCPPError.ts
+++ b/
src/exception/OCPPError.ts
@@
-4,13
+4,19
@@
import { IncomingRequestCommand, RequestCommand } from '../types/ocpp/Requests';
import BaseError from './BaseError';
import { ErrorType } from '../types/ocpp/ErrorType';
import BaseError from './BaseError';
import { ErrorType } from '../types/ocpp/ErrorType';
+import { JsonType } from '../types/JsonType';
export default class OCPPError extends BaseError {
export default class OCPPError extends BaseError {
- code: ErrorType
| IncomingRequestCommand
;
+ code: ErrorType;
command?: RequestCommand | IncomingRequestCommand;
command?: RequestCommand | IncomingRequestCommand;
- details?:
Record<string, unknown>
;
+ details?:
JsonType
;
- constructor(code: ErrorType | IncomingRequestCommand, message: string, command?: RequestCommand | IncomingRequestCommand, details?: Record<string, unknown>) {
+ constructor(
+ code: ErrorType,
+ message: string,
+ command?: RequestCommand | IncomingRequestCommand,
+ details?: JsonType
+ ) {
super(message);
this.code = code ?? ErrorType.GENERIC_ERROR;
super(message);
this.code = code ?? ErrorType.GENERIC_ERROR;