@Override
    public Builder toBuilder() {
        return new Builder()
                .sourceLocation(getSourceLocation())
                .operation(operation)
                .error(error);
    }
Deprecated in favor of {@link ClientEndpointDiscoveryTrait#getOptionalError}.
smithy-aws-traits/src/main/java/software/amazon/smithy/aws/traits/clientendpointdiscovery/ClientEndpointDiscoveryTrait.java