@Override
    public AbstractResponse getErrorResponse(int throttleTimeMs, Throwable e) {
        return new AlterPartitionResponse(new AlterPartitionResponseData()
            .setThrottleTimeMs(throttleTimeMs)
            .setErrorCode(Errors.forException(e).code()));
    }
Get an error response for a request with specified throttle time in the response if applicable
clients/src/main/java/org/apache/kafka/common/requests/AlterPartitionRequest.java