Skip to content

Source returns instance when an ElasticSearch returns an error #723

@PaulEpitomy

Description

@PaulEpitomy

Source methods do not handle ElasticSearch error, e.g if an attempt to access and invalid index name

The following test will fail: -

    [Test]
    public void GetInvalidIndexShouldReturnNull()
    {
        const string indexName = "indexthatdoesnotexist";
        var elasticSearchProject = this._client.Source<ElasticsearchProject>(4, indexName);

        Assert.IsNull(elasticSearchProject);
    }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions