Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
bio-boris opened this issue Sep 22, 2022 · 0 comments
Open
Labels
bug Something isn't working

Comments

@bio-boris
Copy link
Contributor

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.

@bio-boris bio-boris added the bug Something isn't working label Sep 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant