/**
 * Exception unchecked pembawa status HTTP.
 * Ditangkap di satu titik pada batas handler, lalu diterjemahkan menjadi
 * respons JSON berstatus sesuai kebutuhan.
 */
public class ApiException extends RuntimeException {

    private final int status;

    public ApiException(int status, String pesan) {
        super(pesan);
        this.status = status;
    }

    public int status() {
        return status;
    }
}
