package com.billpaymentservice.bbps.exception; import org.springframework.http.HttpStatus; import lombok.Getter; @Getter public class AppException extends RuntimeException { private final String status; private final String message; private final int statusCode; private final Object data; public AppException(String message, HttpStatus httpStatus) { this(message, httpStatus, null); } public AppException(String message, HttpStatus httpStatus, Object data) { super(message); this.message = message; this.status = httpStatus.name(); this.statusCode = httpStatus.value(); this.data = data; } public AppException(String message2, String codeMerchantInvalid) { this.message = message2; this.status = codeMerchantInvalid; this.statusCode = 0; this.data = new Object(); } }