Skip to content

NoSuchIndexException - throw instead of catch #2153

Closed
@CallMeSweets

Description

@CallMeSweets

Hi,
In ReactiveElasticsearchTemplate.class there are such a methods like:

  • protected Mono doCount(SearchRequest request)
  • protected Flux doScroll(SearchRequest request)
  • protected Flux doFind(SearchRequest request)
    That methods catch NoSuchIndexException when index not exists and return Mono.empty(). Is it not better solution to throw such a exception? Because it might be really difficult to guess what the real problem is when we get empty data from elastic when the real problem is wrong index name and there is no information in logs.

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