https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19871 --- Comment #55 from Tomás Cohen Arazi (tcohen) <tomascohen@gmail.com> --- Created attachment 197452 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=197452&action=edit Bug 19871: (QA follow-up) Remove safe_do, use translate_exception directly The safe_do wrapper adds indirection without value: - In Patron::Modification::approve, every operation inside safe_do goes through Object::store or Object::delete, which already call translate_exception internally. The wrapper was translating already-translated exceptions. - In Item::add_to_bundle, the outer try/catch just called rethrow, making the safe_do + try/catch nesting a no-op. This follow-up removes safe_do and aligns both callers with the pattern already used by Object::store and Object::delete: call translate_exception directly in the catch block when raw DBIC operations are involved. Changes: - Remove safe_do from Koha::Schema (and its Try::Tiny import) - Flatten add_to_bundle to use translate_exception in its catch - Flatten Patron::Modification::approve to rely on Object::store - Remove safe_do test, adjust test count Signed-off-by: Tomás Cohen Arazi <tomascohen@theke.io> -- You are receiving this mail because: You are watching all bug changes.