fix: update error handling to use httpx and improve caching logic#19
Open
ronibhakta1 wants to merge 2 commits intoArchiveLabs:mainfrom
Open
fix: update error handling to use httpx and improve caching logic#19ronibhakta1 wants to merge 2 commits intoArchiveLabs:mainfrom
ronibhakta1 wants to merge 2 commits intoArchiveLabs:mainfrom
Conversation
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 ArchiveLabs/pyopds2_openlibrary#54 ArchiveLabs/pyopds2_openlibrary#55 ArchiveLabs/pyopds2_openlibrary#53 ArchiveLabs/pyopds2_openlibrary#46
This pull request refactors error handling to use only the
httpxlibrary (removing allrequestsdependencies), improves language handling in search endpoints, updates group queries for more flexible ebook access filtering, and adds support for configuring the number of Uvicorn worker processes via environment variables. It also updates tests to match the new error handling and facet structure.Error handling and dependency cleanup:
httpxexceptions, removing all usage of therequestslibrary from both the application code and tests. This simplifies dependencies and ensures consistent error handling. [1] [2] [3] [4] [5]Search and language improvements:
languagequery parameter (defaulting to"eng") to the/searchendpoint, allowing clients to specify preferred MARC language codes. This parameter is now logged, forwarded to the provider, and included in the response. [1] [2] [3]ea) based on the current mode, improving the accuracy of book groupings for different access types. [1] [2]Caching and homepage behavior:
/?mode=everythingas equivalent to/, ensuring cache hits regardless of query parameter order and improving cache efficiency. [1] [2]Deployment and concurrency:
WEB_CONCURRENCYenvironment variable, with Docker and configuration script updates to set a sensible default and allow overrides. [1] [2] [3]Testing and facets:
rel="self"usage for active links. [1] [2]