Koha-clms/Koha/Edifact
Martin Renvoize 6d8ea60630
Bug 42993: EDI: log transport failures via Koha::Logger instead of carp
Koha::Edifact::Transport reported every transport failure (no transport
configured, connect failure, directory-change failure, file-listing
failure and per-file download/upload failure) with carp. Under
edi_cron.pl these go to STDERR, so on a normal cron run the messages are
lost and EDI simply goes quiet with nothing in editrace.log to explain
why.

Route these failures through Koha::Logger on the 'edi' interface (the
same interface edi_cron.pl already uses) so they are recorded in the EDI
log. The two ingest()-level data warnings (duplicate filename, unreadable
file) are intentionally left as carp: one is asserted by the existing
unit test and neither is a transport failure.

No change to the transfer logic.

Test plan:
1) prove t/db_dependent/Koha/Edifact/Transport.t
2) Point an EDI account at an unreachable transport and run edi_cron.pl;
   confirm the failure is now written to the edi log rather than only to
   STDERR.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Andrew Fuerste Henry <andrew@bywatersolutions.com>
Signed-off-by: Pedro Amorim <pedro.amorim@openfifth.co.uk>
2026-09-01 15:42:15 +00:00
..
File Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00
File.pm Bug 40383: (follow-up) Fix failing EdifactModal Cypress tests 2026-05-21 10:49:43 -06:00
Files.pm Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00
Line.pm Bug 40391: Add support for GIR:LSL (Library Sub-Location) in EDIFACT processing 2026-01-12 10:53:29 -07:00
Message.pm Bug 20253: Optionally use buyer's purchase order number from EDIFACT quote as basket name 2025-11-03 14:13:37 -07:00
Order.pm Bug 30144: Process and send servicing instructions in EDI messages 2026-08-28 16:36:21 +00:00
Segment.pm Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00
Transport.pm Bug 42993: EDI: log transport failures via Koha::Logger instead of carp 2026-09-01 15:42:15 +00:00