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

records: invalid query string gives internal server errors #791

Closed
lnielsen opened this issue Sep 14, 2016 · 2 comments
Closed

records: invalid query string gives internal server errors #791

lnielsen opened this issue Sep 14, 2016 · 2 comments
Labels

Comments

@lnielsen
Copy link
Member

lnielsen commented Sep 14, 2016

https://zenodo.org/api/deposit/depositions?page=1&q=doi:"10.5281%2Fzenodo.59255&size=20

RequestError: TransportError(400, u'search_phase_execution_exception', u'Failed to parse query [doi:"10.5281/zenodo.59255]')
Stacktrace (most recent call last):

  File "flask/app.py", line 1988, in wsgi_app
    response = self.full_dispatch_request()
  File "flask/app.py", line 1641, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "flask_cors/extension.py", line 188, in wrapped_function
    return cors_after_request(app.make_response(f(*args, **kwargs)))
  File "flask/app.py", line 1544, in handle_user_exception
    reraise(exc_type, exc_value, tb)
  File "flask/app.py", line 1639, in full_dispatch_request
    rv = self.dispatch_request()
  File "flask/app.py", line 1625, in dispatch_request
    return self.view_functions[rule.endpoint](**req.view_args)
  File "flask/views.py", line 84, in view
    return self.dispatch_request(*args, **kwargs)
  File "invenio_rest/views.py", line 207, in dispatch_request
    *args, **kwargs
  File "flask/views.py", line 149, in dispatch_request
    return meth(*args, **kwargs)
  File "invenio_records_rest/views.py", line 425, in get
    search_result = search.execute()
  File "elasticsearch_dsl/search.py", line 627, in execute
    **self._params
  File "elasticsearch/client/utils.py", line 69, in _wrapped
    return func(*args, params=params, **kwargs)
  File "elasticsearch/client/__init__.py", line 548, in search
    doc_type, '_search'), params=params, body=body)
  File "elasticsearch/transport.py", line 329, in perform_request
    status, headers, data = connection.perform_request(method, url, params, body, ignore=ignore, timeout=timeout)
  File "elasticsearch/connection/http_requests.py", line 84, in perform_request
    self._raise_error(response.status_code, raw_data)
  File "elasticsearch/connection/base.py", line 108, in _raise_error
    raise HTTP_EXCEPTIONS.get(status_code, TransportError)(status_code, error_message, additional_info)
@lnielsen lnielsen added the Bug label Sep 14, 2016
@lnielsen lnielsen added this to the Post-Launch milestone Sep 14, 2016
@lnielsen
Copy link
Member Author

Related:
https://zenodo.org/api/records/?f=author&page=1&q=Meier+Kressig,+Marcel+(Autor%2Fin)&size=20

TypeError Root Cause
'RequestError' object is not callable

Stacktrace (most recent call last):

  File "flask/app.py", line 1988, in wsgi_app
    response = self.full_dispatch_request()
  File "flask/app.py", line 1641, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "flask_cors/extension.py", line 188, in wrapped_function
    return cors_after_request(app.make_response(f(*args, **kwargs)))
  File "flask/app.py", line 1746, in make_response
    rv = self.response_class.force_type(rv, request.environ)
  File "werkzeug/wrappers.py", line 847, in force_type
    response = BaseResponse(*_run_wsgi_app(response, environ))
  File "werkzeug/test.py", line 871, in run_wsgi_app
    app_rv = app(environ, start_response)
RequestError(400, u'search_phase_execution_exception', {u'status': 400, u'error': {u'failed_shards': [{u'node': ....', u'index': u'records-record-v1.0.0', u'reason': {u'index': u'records-record-v1.0.0', u'caused_by': {u'caused_by': {u'reason': u'token_mgr_error: Lexical error at line 1, column 33.  Encountered: <EOF> after : "/in)"', u'type': u'token_mgr_error'}, u'reason': u'parse_exception: Cannot parse \'Meier Kressig, Marcel (Autor/in)\': Lexical error at line 1, column 33.  Encou...

@slint
Copy link
Member

slint commented Oct 6, 2016

Related to inveniosoftware/invenio-records-rest#122

slint added a commit to slint/zenodo that referenced this issue Nov 2, 2016
* Configures Elasticsearch REST error handling by adding an extra error
  type code. (closes zenodo#791)

* Configures invenio-oauth2server to include additional allowed
  characters, fixing urlencode issues on various REST API search
  URLs. (closes zenodo#805)

Signed-off-by: Alexander Ioannidis <a.ioannidis@cern.ch>
slint added a commit to slint/zenodo that referenced this issue Nov 2, 2016
* Configures Elasticsearch REST error handling by adding an extra error
  type code. (closes zenodo#791)

* Configures invenio-oauth2server to include additional allowed
  characters, fixing urlencode issues on various REST API search
  URLs. (closes zenodo#805)

Signed-off-by: Alexander Ioannidis <a.ioannidis@cern.ch>
slint added a commit to slint/zenodo that referenced this issue Nov 18, 2016
* Configures Elasticsearch REST error handling by adding an extra error
  type code. (closes zenodo#791)

* Configures invenio-oauth2server to include additional allowed
  characters, fixing urlencode issues on various REST API search
  URLs. (closes zenodo#805)

Signed-off-by: Alexander Ioannidis <a.ioannidis@cern.ch>
slint added a commit to slint/zenodo that referenced this issue Nov 21, 2016
* Configures Elasticsearch REST error handling by adding an extra error
  type code. (closes zenodo#791)

* Configures invenio-oauth2server to include additional allowed
  characters, fixing urlencode issues on various REST API search
  URLs. (closes zenodo#805)

Signed-off-by: Alexander Ioannidis <a.ioannidis@cern.ch>
slint added a commit to slint/zenodo that referenced this issue Nov 21, 2016
* Configures Elasticsearch REST error handling by adding an extra error
  type code. (closes zenodo#791)

* Configures invenio-oauth2server to include additional allowed
  characters, fixing urlencode issues on various REST API search
  URLs. (closes zenodo#805)

Signed-off-by: Alexander Ioannidis <a.ioannidis@cern.ch>
slint added a commit to slint/zenodo that referenced this issue Nov 22, 2016
* Configures Elasticsearch REST error handling by adding an extra error
  type code. (closes zenodo#791)

* Configures invenio-oauth2server to include additional allowed
  characters, fixing urlencode issues on various REST API search
  URLs. (closes zenodo#805)

Signed-off-by: Alexander Ioannidis <a.ioannidis@cern.ch>
slint added a commit to slint/zenodo that referenced this issue Nov 22, 2016
* Configures Elasticsearch REST error handling by adding an extra error
  type code. (closes zenodo#791)

* Configures invenio-oauth2server to include additional allowed
  characters, fixing urlencode issues on various REST API search
  URLs. (closes zenodo#805)

* Swaps `invenio_records_rest.view.file_download_ui` with
  `invenio_records_files.utils.file_download_ui`.

Signed-off-by: Alexander Ioannidis <a.ioannidis@cern.ch>
slint added a commit to slint/zenodo that referenced this issue Nov 22, 2016
* Configures Elasticsearch REST error handling by adding an extra error
  type code. (closes zenodo#791)

* Configures invenio-oauth2server to include additional allowed
  characters, fixing urlencode issues on various REST API search
  URLs. (closes zenodo#805)

* Swaps `invenio_records_rest.view.file_download_ui` with
  `invenio_records_files.utils.file_download_ui`.

Signed-off-by: Alexander Ioannidis <a.ioannidis@cern.ch>
slint added a commit to slint/zenodo that referenced this issue Nov 22, 2016
* Configures Elasticsearch REST error handling by adding an extra error
  type code. (closes zenodo#791)

* Configures invenio-oauth2server to include additional allowed
  characters, fixing urlencode issues on various REST API search
  URLs. (closes zenodo#805)

* Swaps `invenio_records_rest.view.file_download_ui` with
  `invenio_records_files.utils.file_download_ui`.

Signed-off-by: Alexander Ioannidis <a.ioannidis@cern.ch>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants