https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42769
--- Comment #27 from Martin Renvoize (ashimema) <[email protected]> --- Created attachment 208463 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=208463&action=edit Bug 42769: (QA follow-up) Report handler failures and bad requests correctly from the SIP2 message tester The controller maps NoPermission to a 403, Patron::NotFound to a 404 and BadParameter to a 400, which is right for the checks on the request but wrong for anything thrown from inside a SIP handler: a handler that fails with one of those would tell the user that they were refused, that their patron doesn't exist or that they sent bad input. Errors from a handler are now wrapped in a Koha::Exception, so they come back as a 500, and only the refusals the tester makes itself keep their meaning. Also: - An account with no patron to log in as, and an institution that is not in the configuration, are ObjectNotFound and answer with a 404 and a message. - An implementation that cannot be loaded says so, instead of failing with "Can't locate object method". - A barcode or password containing the field delimiter is refused with a 400. It would add fields to the request, so the request that was run differed from the one the form described. - A patron password of 0 is no longer dropped from the request. To test: 1) prove t/db_dependent/Koha/SIP2/MessageTester.t 2) prove t/db_dependent/api/v1/sip2_account_test_message.t Signed-off-by: Martin Renvoize <[email protected]> -- You are receiving this mail because: You are watching all bug changes. _______________________________________________ Koha-bugs mailing list -- [email protected] To unsubscribe send an email to [email protected] website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
