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

import com.atlassian.bitbucket.mesh.git.exception.AbstractGitException;
import com.atlassian.bitbucket.mesh.rpc.v1.RpcDisableTranscodeFailed;
import com.atlassian.bitbucket.mesh.rpc.v1.RpcGitError;
import io.grpc.Status;

import javax.annotation.Nonnull;
import javax.annotation.Nullable;

public class DisableTranscodeFailedException extends AbstractGitException {

    public DisableTranscodeFailedException(@Nullable Throwable cause) {
        super(cause, Status.INTERNAL);
    }

    @Nonnull
    @Override
    public RpcGitError toError() {
        return RpcGitError.newBuilder()
                .setDisableTranscodeFailed(RpcDisableTranscodeFailed.getDefaultInstance())
                .build();
    }
}
