[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
Fri Mar 15 01:34:11 CET 2024


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

David Nind <david at davidnind.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #163116|0                           |1
        is obsolete|                            |

--- Comment #4 from David Nind <david at davidnind.com> ---
Created attachment 163156
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=163156&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 at davidnind.com>

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


More information about the Koha-bugs mailing list