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

DACCESS-529 - Use rsolr instead of HTTPClient in BrowseController #2254

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from

Conversation

chrisrlc
Copy link
Contributor

@chrisrlc chrisrlc commented Mar 7, 2025

https://culibrary.atlassian.net/browse/DACCESS-529 - fq param with spaces in call number browse returns HTTPClient::BadResponseError
https://culibrary.atlassian.net/browse/DACCESS-530 - Browse controller does not handle bad responses from Solr
https://culibrary.atlassian.net/browse/DACCESS-531 - Standardize Solr fetch code in browse controller

  • Use rsolr instead of HTTPClient for connecting to solr from BrowseController (browse#index esp.) and for virtual call number browse on catalog record pages.
  • Rescue RSolr::Error::Http using blacklight's default request error handling (#handle_request_error), which logs the error, redirects to browse#index, and displays a flash message.
  • Dries up logic in browse#index to reuse solr browse logic across Author, Author-Title, Subject, Call-Number and virtual browse types.
  • Remove library encoding in url in view so we're not double-encoding the param before sending to solr (rsolr already handles this)

If I had more time, I'd have written more tests to improve code coverage on this area of the code, but I was trying to hustle to include this in next week's sprint deploy. But I don't want to hold anything back, so if anything turns up in the PR review (or if it's too short notice to review this PR before deploy!), I can just sync with Jesi to see if this merits its own off-sprint deploy.

@chrisrlc chrisrlc force-pushed the DACCESS-529-browse-rsolr branch from bbb11ef to 893bd5d Compare March 7, 2025 20:24
Rescue RSolr::Error::Http in BrowseController
@chrisrlc chrisrlc force-pushed the DACCESS-529-browse-rsolr branch from eb772a6 to d9d06f0 Compare March 8, 2025 00:17
@chrisrlc chrisrlc changed the title [WIP] DACCESS-529 - Use rsolr instead of HTTPClient in BrowseController DACCESS-529 - Use rsolr instead of HTTPClient in BrowseController Mar 8, 2025
@chrisrlc chrisrlc requested review from Baroquem and sarah-cul March 8, 2025 16:14
@chrisrlc chrisrlc marked this pull request as ready for review March 8, 2025 16:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant