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

Unclosed <match> tag breaks search #94

Open
bbonf opened this issue Dec 6, 2023 · 0 comments
Open

Unclosed <match> tag breaks search #94

bbonf opened this issue Dec 6, 2023 · 0 comments
Labels
bug Something isn't working

Comments

@bbonf
Copy link

bbonf commented Dec 6, 2023

From the logs:

Traceback (most recent call last):
  File "/hum/web/gw-c-dh-gretel5.im.hum.uu.nl/data/env/lib64/python3.8/site-packages/django/core/handlers/exception.py", line 55, in inner
    response = get_response(request)
  File "/hum/web/gw-c-dh-gretel5.im.hum.uu.nl/data/env/lib64/python3.8/site-packages/django/core/handlers/base.py", line 197, in _get_response
    response = wrapped_callback(request, *callback_args, **callback_kwargs)
  File "/hum/web/gw-c-dh-gretel5.im.hum.uu.nl/data/env/lib64/python3.8/site-packages/django/views/decorators/csrf.py", line 56, in wrapper_view
    return view_func(*args, **kwargs)
  File "/hum/web/gw-c-dh-gretel5.im.hum.uu.nl/data/env/lib64/python3.8/site-packages/django/views/generic/base.py", line 104, in view
    return self.dispatch(request, *args, **kwargs)
  File "/hum/web/gw-c-dh-gretel5.im.hum.uu.nl/data/env/lib64/python3.8/site-packages/rest_framework/views.py", line 509, in dispatch
    response = self.handle_exception(exc)
  File "/hum/web/gw-c-dh-gretel5.im.hum.uu.nl/data/env/lib64/python3.8/site-packages/rest_framework/views.py", line 469, in handle_exception
    self.raise_uncaught_exception(exc)
  File "/hum/web/gw-c-dh-gretel5.im.hum.uu.nl/data/env/lib64/python3.8/site-packages/rest_framework/views.py", line 480, in raise_uncaught_exception
    raise exc
  File "/hum/web/gw-c-dh-gretel5.im.hum.uu.nl/data/env/lib64/python3.8/site-packages/rest_framework/views.py", line 506, in dispatch
    response = handler(request, *args, **kwargs)
  File "/hum/web/gw-c-dh-gretel5.im.hum.uu.nl/data/env/lib64/python3.8/site-packages/rest_framework/decorators.py", line 50, in handler
    return func(*args, **kwargs)
  File "/hum/web/gw-c-dh-gretel5.im.hum.uu.nl/data/source/backend/search/views.py", line 214, in search_view
    results, percentage, counts = query.get_results(maximum_results, exclude=returned)
  File "/hum/web/gw-c-dh-gretel5.im.hum.uu.nl/data/source/backend/search/models.py", line 343, in get_results
    matches = result_obj.get_results()
  File "/hum/web/gw-c-dh-gretel5.im.hum.uu.nl/data/source/backend/search/models.py", line 90, in get_results
    return parse_search_result(results, self.component.slug)
  File "/hum/web/gw-c-dh-gretel5.im.hum.uu.nl/data/source/backend/search/basex_search.py", line 204, in parse_search_result
    raise ValueError('Cannot parse XQuery result: <match> '
ValueError: Cannot parse XQuery result: <match> is not closed in 

Maybe it happens when the results are still being written? In any case, a single error like this causes /search to return 500 and break the entire results page for the user, which isn't ideal

@bbonf bbonf added the bug Something isn't working label Dec 6, 2023
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