| Total Complexity | 1 |
| Total Lines | 15 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | package com.dawn.jat.illuminati.core.response; |
||
| 9 | @Getter |
||
| 10 | public class ErrorResponse { |
||
| 11 | private Map<String, Object> error; |
||
| 12 | private final Boolean success = false; |
||
| 13 | |||
| 14 | /** |
||
| 15 | * Error Response. |
||
| 16 | * |
||
| 17 | * @param httpStatus HttpStatus |
||
| 18 | * @param exception Exception |
||
| 19 | */ |
||
| 20 | public ErrorResponse(HttpStatus httpStatus, Exception exception) { |
||
| 21 | error = new LinkedHashMap<>(); |
||
| 22 | error.put("code", httpStatus.value()); |
||
| 23 | error.put("message", exception.getMessage()); |
||
| 24 | } |
||
| 25 | } |