https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38145

--- Comment #4 from Olivia Reynolds <[email protected]> ---
Created attachment 200206
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=200206&action=edit
Bug 38145: (draft) Propagate more search errors

This is a _draft_ patch. It resolves the two issues mentioned in this
bug (unable to catalog without ES being up, Zebra silently producing no
search results on error), but I suspect it's incomplete.

Test plan:
1.  Launch KTD with ElasticSearch: `ktd --search-engine es7 up`
2.  Edit `/etc/koha/sites/kohadev/koha-conf.xml` to set an incorrect
    address for ElasticSearch.
3.  Attempt to catalog, verify there is an ElasticSearch error from not
    being able to search for duplicates.
4.  Apply patch.
5.  Attempt to catalog, verify it works successfully.
6.  Revert patch.
7.  Relaunch KTD with Zebra: `ktd down && ktd up`.
8.  Stop Zebra in the KTD shell: `sudo koha-zebra --stop kohadev`.
9.  Perform a search, verify there are no results and no errors.
10. Apply patch.
11. Perform the search again, verify there are no results and an error
    about not being able to connect to Zebra.

Some points for discussion I'm not sure about:
- What would be the best approach to unit testing these changes?
- Should searches across multiple Zebra servers fail if any of those
  servers error?  I couldn't immediately find a caller that passed
  multiple servers, so maybe this case never occurs?
- Is there a better way of aggregating the Zebra errors?
- Should we surface the Zebra errors directly, or have an equivalent of
  ElasticSearch's `process_error` that tries to come up with a
  user-readable error?

-- 
You are receiving this mail because:
You are watching all bug changes.
You are the assignee for the bug.
_______________________________________________
Koha-bugs mailing list
[email protected]
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

Reply via email to