package com.atlassian.bitbucket.internal.scm.git.lfs.model;

import javax.annotation.Nonnull;

import static java.util.Objects.requireNonNull;

/**
 * A response object that describes an error
 */
public class ResponseErrorObject extends ResponseObject {

    private final int errorCode;
    private final String message;

    public ResponseErrorObject(@Nonnull String oid, long size, int errorCode, @Nonnull String message) {
        super(oid, size);
        this.errorCode = errorCode;
        this.message = requireNonNull(message, "message");
    }

    public int getErrorCode() {
        return errorCode;
    }

    @Nonnull
    public String getMessage() {
        return message;
    }
}
