The DIE handler should be more restrictive and only log errors where the call stack clearly originates from SIP modules (e.g., C4::SIP::*). The current implementation is not strict enough or may have edge cases. Found this kind of errors from our logs: [2026/01/23 13:42:47] [493898] [ERROR] [undef]@[undef]: commandline was not set during initialization at /usr/share/perl5/Net/Server.pm line 100. C4::SIP::Trapper::__ANON__ /home/koha/Koha/C4/SIP/Trapper.pm (70)
Created attachment 192093 [details] [review] Bug 41707: Modify C4::SIP::Trapper DIE handling for better logging This patch improves the error handling in the SIP Trapper module by logging only SIP-related errors as errors and non-SIP errors as warnings. This change aims to reduce noise in the logs and make it easier to identify genuine SIP-related issues. Test plan: 1. Apply the patch 2. prove -lv t/db_dependent/SIP/Trapper.t 3. Ensure all tests pass without errors 4. Start the server: perl C4/SIP/SIPServer.pm /etc/koha/SIPconfig.xml 5. misc/sip_cli_emulator.pl -a 127.0.0.1 -p 6001 -su koha -sp koha -l MPL --patron koha -m patron_information 6. Verify that only SIP-related errors are logged as errors and non-SIP errors are warned. Sponsored-by: Koha-Suomi Oy