https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21043
--- Comment #23 from Kyle M Hall <k...@bywatersolutions.com> --- Created attachment 150766 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=150766&action=edit Bug 21043: Handle exceptions and switch to debit response We were cheating a bit here and expecting a 'debit' to be sent in but a 'line' to be returned. We should really be sending a debit and returning a debit.. so I've update the paths schema as such and we're now coercing the Koha::Account::Line object that's returned by Koha::Account->add_debit into a Koha::Account::Debit object. Longer term it would be nice to convert returns from the various Koha::Account methods to their correct Koha::Account:: objects as apposed to them all being the base ::Line I've also added some code to catch exceptions that can be thrown by Koha::Account->add_debit and added the appropriate 400 errors into the path specs again. Finally.. I added more unit tests to prove the above Signed-off-by: Martin Renvoize <martin.renvo...@ptfs-europe.com> Signed-off-by: Kyle M Hall <k...@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes. _______________________________________________ Koha-bugs mailing list Koha-bugs@lists.koha-community.org https://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/