package xyz.mcutils.exception; import io.micrometer.common.lang.NonNull; import lombok.AllArgsConstructor; import lombok.Getter; import lombok.ToString; import org.springframework.http.HttpStatus; import java.util.Date; @Getter @ToString @AllArgsConstructor public class ErrorResponse extends RuntimeException { /** * The status code of this error. */ @NonNull private final HttpStatus status; /** * The HTTP code of this error. */ private final int code; /** * The message of this error. */ @NonNull private final String message; /** * The timestamp this error occurred. */ @NonNull private final Date timestamp; }