https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36307 --- Comment #5 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 164463 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=164463&action=edit Bug 36307: SMS::Send driver errors are not captured and stored If an SMS::Send driver succeeds, it returns a value that evaluates to true. Every driver I've inspected uses croak when it encounters a failure state. When an SMS message fails to send, code hard codes the failure code to NO_NOTES (No notes from SMS driver). We should store the real error in `failure_code` and display that if the failure code doesn't match a known failure code. Test Plan: 1) Apply this patch 2) Set SMSSendDriver to any value 3) Generate a pending sms message 4) Run the following query: update message_queue set status = 'failed', failure_code = "This is a test"; 5) View the patron's messages, note the delivery note contains the contents of the failure code 6) Run the following query: update message_queue set status = 'failed', failure_code = "SMS_SEND_DRIVER_MISSING"; 7) Reload the patron's messages, not the delivery note is now "The SMS driver could not be loaded". Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> -- You are receiving this mail because: You are watching all bug changes.