https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19871 --- Comment #50 from Tomás Cohen Arazi (tcohen) <tomascohen@gmail.com> --- Created attachment 197447 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=197447&action=edit Bug 19871: Update Koha::Patron::Modification to use centralized exception handling Replace manual DBIx::Class::Exception handling in the approve() method with the centralized exception translation system while preserving domain-specific exception behavior. Changes: - Use $schema->safe_do() for database operations with automatic exception translation - Wrap safe_do in try/catch to convert any exception to domain-specific Patron::Modification exception - Simplify exception handling logic while maintaining the same API contract - Remove manual DBIx::Class::Exception type checking This maintains backward compatibility by always throwing Koha::Exceptions::Patron::Modification exceptions as before, but leverages the centralized system for consistent database exception handling. Sponsored-by: OpenFifth <https://openfifth.co.uk> Signed-off-by: Jackie Usher <jackie.usher@westsussex.gov.uk> Signed-off-by: Tomás Cohen Arazi <tomascohen@theke.io> -- You are receiving this mail because: You are watching all bug changes.