- public ErrorTransport(int statusCode, String errMsg, Exception exception) {
- this.status = statusCode;
- this.error = errMsg;
- if (exception != null) {
- final int enough = 512;
- String exString = exception.toString();
- String exceptionMsg = exString.length() > enough ? exString.substring(0, enough) : exString;
- this.exception = exceptionMsg;
- }
+ public ErrorTransport(int status, String error, String message, String path) {
+ this.timestamp = Instant.now();
+ this.status = status;
+ this.error = error;
+ this.message = message;
+ this.path = path;