[Koha-bugs] [Bug 16330] REST API: add routes to add, update and delete patrons

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Mon Aug 29 11:31:00 CEST 2016


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16330

--- Comment #26 from Benjamin Rokseth <benjamin.rokseth at kul.oslo.kommune.no> ---
(In reply to Jonathan Druart from comment #21)
> Are you sure we want to raise such specific error like "library does not
> exist" or "category does not exist"?
> I'd go for an eval { $patron->store } and return a 500 if something went
> wrong.


Well, yes and no. If missing category or branch is not part of error response,
it is no good. API user must not be expected to know about koha internal
dependencies, so a generic internal server response is not a good option.

That being said, the Patron object is probably the best place to handle
exceptions, e.g. Bug 16907. So if patron->store gives the needed feedback, it
is no point duplicating code/logic in api.

So yes, I agree, but am a bit unsure about alternatives?

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list