[Koha-bugs] [Bug 36307] SMS::Send driver errors are not captured and stored

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Wed Mar 13 18:38:10 CET 2024


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36307

--- Comment #1 from Kyle M Hall <kyle at bywatersolutions.com> ---
Created attachment 163116
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=163116&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".

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list