Skip to content

Option to override default NEST high-level client behavior for 404 status codes #5754

Open
@yevhen

Description

@yevhen

In our code, we heavily rely on ElasticClientException being thrown for requests made to missing documents/indices. While upgrading to 7.x we figured out that we need substantial changes to be made in too many places. Moreover, the previous behavior was easy to use with higher-order functions - you just catch ElasticClientException in top-level code and you're done. With new behavior, we need to augment low-level code everywhere to check for ResponseBase.IsValid property at the point of invocation which makes it non-composable and leads to ugly and verbose code (ala Go err checking).

Please, provide a global option for NEST high-level client, so that it doesn't override StatusCodeToResponseSuccess for 404 status codes.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions