Bug 33816 - Holds API errors not easily machine-readable
Summary: Holds API errors not easily machine-readable
Status: NEW
Alias: None
Product: Koha
Classification: Unclassified
Component: REST API (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Bugs List
QA Contact:
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-05-24 00:09 UTC by David Cook
Modified: 2023-05-24 00:09 UTC (History)
1 user (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description David Cook 2023-05-24 00:09:55 UTC
At the moment, if you place a hold via the Holds API and there are too many holds for the record, you get the following response:

{"error":"Hold cannot be placed. Reason: tooManyHoldsForThisRecord"}

That's a message that is meant for a human developer. It's not showable to a human audience, and it's not easily parsed by a machine. 

It would be good to have a human readable message for troubleshooting, but the core error code should just be "tooManyHoldsForThisRecord", as a machine can take that string and work with it as a code.