Let search inside work if availability is down#11521
Merged
mekarpeles merged 4 commits intointernetarchive:masterfrom Dec 29, 2025
Merged
Let search inside work if availability is down#11521mekarpeles merged 4 commits intointernetarchive:masterfrom
mekarpeles merged 4 commits intointernetarchive:masterfrom
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This pull request addresses issue #11519 by allowing the search inside functionality to continue working even when the availability service is down. Previously, when get_availability returned an error, the function would return empty search results. Now, it continues with an empty availability dictionary and fetches editions directly from the database.
Key changes:
- Modified error handling to set
availability = {}instead of returning empty hits when availability service fails - Changed edition lookup from using availability data to directly querying by ocaid
- Simplified edition processing to use
.get()for safe access to availability data
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
c9ce8c7 to
e78b465
Compare
Member
|
@cdrini lgtm -- I added |
mystic-06
pushed a commit
to mystic-06/openlibrary
that referenced
this pull request
Jan 11, 2026
…e-no-availability Let search inside work if availability is down
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #11519 . Note it fixes it so that the page isn't empty, but the borrow buttons again say "Locate" instead of the correct availability if the availability service is erroring.
Technical
Testing
Tested on testing and confirmed it still works, but testing isn't exhibiting the bug described in the issue. Going to patch deploy to see if it fixes it there.
Screenshot
Stakeholders