Closed everaldorodrigo closed 2 months ago
The application should raise an exception when there is a timeout connection when connecting to the Elasticsearch.
However, there is an error in the exception handling function:
AttributeError: 'ConnectionTimeout' object has no attribute 'error'
There bug is in this line: https://github.com/biothings/biothings.api/blob/8a430d25c8f31e7d43c74317887cee5feab32fd6/biothings/web/query/pipeline.py#L134
Refactor the exception handling function.
Context
The application should raise an exception when there is a timeout connection when connecting to the Elasticsearch.
However, there is an error in the exception handling function:
There bug is in this line: https://github.com/biothings/biothings.api/blob/8a430d25c8f31e7d43c74317887cee5feab32fd6/biothings/web/query/pipeline.py#L134
Solution
Refactor the exception handling function.