Add generated error code to exceptions

This commit is contained in:
René Pfeuffer
2018-10-25 16:23:43 +02:00
parent 6eb3c38655
commit 7f0b7c5831
5 changed files with 25 additions and 1 deletions

View File

@@ -30,6 +30,6 @@ public class ErrorDto {
}
public static ErrorDto from(ExceptionWithContext exception) {
return new ErrorDto(MDC.get("transaction_id"), "todo", exception.getContext(), exception.getMessage());
return new ErrorDto(MDC.get("transaction_id"), exception.getCode(), exception.getContext(), exception.getMessage());
}
}