public FailedDocument withError(ErrorDetail error) {
        setError(error);
        return this;
    }
<p>
An explanation for why the document couldn't be removed from the index.
</p>

@param error
       An explanation for why the document couldn't be removed from the index.
@return Returns a reference to this object so that method calls can be chained together.
aws-java-sdk-qbusiness/src/main/java/com/amazonaws/services/qbusiness/model/FailedDocument.java