Skip to content

Raise exceptions when arango client fails and print entire json response #173

@bio-boris

Description

@bio-boris

During startup, the container fails with a mysterious error

icu_tokenize {'name': 'icu_tokenize', 'type': 'text', 'properties': {'locale': 'en_US', 'accent': False, 'case': 'lower', 'stemming': False, 'stopwords': []}}
Creating analyzer icu_tokenize

...<snip>
Creating analyzer icu_tokenize
Traceback (most recent call last):
  File "./relation_engine_server/utils/pull_spec.py", line 153, in <module>
    download_specs()
  File "./relation_engine_server/utils/pull_spec.py", line 63, in download_specs
    do_init_analyzers()
  File "./relation_engine_server/utils/pull_spec.py", line 105, in do_init_analyzers
    arango_client.create_analyzer(analyzer_name, config)
  File "/app/relation_engine_server/utils/arango_client.py", line 416, in create_analyzer
    raise ArangoServerError(resp.text)
relation_engine_server.utils.arango_client.ArangoServerError: ArangoDB server error.

The actual error is as such

{'code': 409, 'error': True, 'errorMessage': "unique constraint violated - in index primary of type primary over '_key'; conflicting key: icu_tokenize", 'errorNum': 1210}

Reproducible by logging into the container with entrypoint of /bin/sleep args of infinity and adding a print to (resp.json)
and running
app # PYTHONPATH=.:lib python ./relation_engine_server/utils/pull_spec.py

This issue requests adding exceptions when arango client fails and printing entire json response.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions