CS-SI / eodag-labextension

Jupyterlab extension for EODAG search
Apache License 2.0
18 stars 2 forks source link

Error message not contextual #23

Closed sbrunato closed 3 years ago

sbrunato commented 3 years ago

Extension always returns the same error message, even if the rest search service is perfectly working.

For an eodag error eg. when searching for products of product type 'CBERS4_AWFI_L4', the error message is

image

when search API get the eodag error:

HTTPServerRequest(protocol='http', host='jupyterhub.cnes.fr', method='GET', uri='/user/triquetc/eodag/CBERS4_AWFI_L4/?box=0.527343,42.15906,4.21875,45.208875&cloudCover=100&page=1&dtstart=2021-04-25&dtend=2021-05-13', version='HTTP/1.1', remote_ip='10.135.10.13')
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/dist-packages/tornado/web.py", line 1702, in _execute
    result = method(*self.path_args, **self.path_kwargs)
  File "/usr/local/lib/python3.6/dist-packages/tornado/web.py", line 3173, in wrapper
    return method(self, *args, **kwargs)
  File "/usr/local/lib/python3.6/dist-packages/eodag_labextension/handlers.py", line 72, in get
    response = search_products(product_type, arguments)
  File "/usr/local/lib/python3.6/dist-packages/eodag/rest/utils.py", line 301, in search_products
    **dict(criteria, **arguments),
  File "/usr/local/lib/python3.6/dist-packages/eodag/api/core.py", line 562, in search
    search_plugin, count=True, raise_errors=raise_errors, **search_kwargs
  File "/usr/local/lib/python3.6/dist-packages/eodag/api/core.py", line 938, in _do_search
    res, nb_res = search_plugin.query(count=count, **kwargs)
  File "/usr/local/lib/python3.6/dist-packages/eodag/plugins/search/qssearch.py", line 862, in query
    page=page, items_per_page=items_per_page, count=count, **kwargs
  File "/usr/local/lib/python3.6/dist-packages/eodag/plugins/search/qssearch.py", line 875, in collect_search_urls
    **dict(collection=collection, **kwargs["auth"].config.credentials)
AttributeError: 'PluginConfig' object has no attribute 'credentials'
[W 2021-05-21 11:14:09.633 SingleUserLabApp handlers:617] Unhandled error
sbrunato commented 3 years ago

In GitLab by @ctriquet-cs on May 21, 2021, 13:15

changed the description

sbrunato commented 3 years ago

In GitLab by @ctriquet-cs on May 21, 2021, 13:15

assigned to @PhML

sbrunato commented 3 years ago

In GitLab by @ctriquet-cs on Jun 24, 2021, 15:21

The ideal solution would be to extract the real error message but I don't know if it's easy. The current message is not relevant.

sbrunato commented 3 years ago

In GitLab by @PhML on Jun 25, 2021, 15:26

mentioned in merge request !14 6e9ee6af2c3cbc5d3362d1e16da750230f2a1556