Skip to content

Better handling of exception at Index creation #8

@qcoumes

Description

@qcoumes

Currently, a lot of errors are catched as an "Already exists", event completely different problem:

opensearchpy.exceptions.RequestError: RequestError(400, 'illegal_argument_exception', 'enable_position_increments is not supported anymore. Please fix your analysis chain')
Creating index 'patient'... Error (already exists)
exiting..

The exception handling code here :

except opensearchpy.exceptions.RequestError:
if verbosity or not ignore_error:
self.stderr.write(
f"{pp} index '{index._name}'... {self.style.ERROR('Error (already exists)')}") # noqa
if not ignore_error:
self.stderr.write("exiting...")
exit(1)

must be modified to better report any error.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinggood first issueGood for newcomers

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions