https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16330
--- Comment #26 from Benjamin Rokseth <[email protected]> --- (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. _______________________________________________ Koha-bugs mailing list [email protected] http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
