package com.bio.bio_backend.global.exception;

import lombok.Getter;
import com.bio.bio_backend.global.constants.ApiResponseCode;

@Getter
public class ApiException extends RuntimeException {
    private final ApiResponseCode responseCode;

    public ApiException(ApiResponseCode responseCode) {
        super(responseCode.getDescription());
        this.responseCode = responseCode;
    }

    public ApiException(ApiResponseCode responseCode, String message) {
        super(message);
        this.responseCode = responseCode;
    }

    public ApiException(ApiResponseCode responseCode, Throwable cause) {
        super(responseCode.getDescription(), cause);
        this.responseCode = responseCode;
    }
}