package com.atlassian.bitbucket.mesh.git.exception;

import com.atlassian.bitbucket.mesh.AbstractStatusException;
import io.grpc.Status;

import javax.annotation.Nonnull;

import static java.util.Objects.requireNonNull;

/**
 * That's your 500 error speaking in HTTP terms.
 */
public class InternalFailureException extends AbstractStatusException {

    public InternalFailureException(@Nonnull String message) {
        super(requireNonNull(message, "message"), Status.INTERNAL);
    }

    public InternalFailureException(@Nonnull String message, @Nonnull Throwable cause) {
        super(requireNonNull(message, "message"), requireNonNull(cause, "cause"), Status.INTERNAL);
    }
}
