Update the exceptions returned from overdrive API (PP-2154) #2300
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.
Description
Some minor updates to the Overdrive API based on the investigation I'm doing in PP-2154.
AlreadyOnHold
exception instead of returning a hold info object.NoAvailableCopies
.In both these cases the Circulation API that calls the Overdrive API was doing the same work that was being done in the Overdrive API, so we should just do the simple thing, and let the caller handle the outcome.
I'll add some context in comments on the PR.
Motivation and Context
These don't fix the holds issue in PP-2154, but I think they are good changes to make anyway, having followed through some full OD requests in the debugger.
How Has This Been Tested?
Checklist