From 9de14f4c9c67150d3a5c932c22489c8d900e4d4e Mon Sep 17 00:00:00 2001 From: Norbert Kwizera Date: Thu, 9 Jan 2025 16:52:22 +0200 Subject: [PATCH] Do not log EX MT response check error --- handlers/external/handler.go | 2 +- handlers/external/handler_test.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/handlers/external/handler.go b/handlers/external/handler.go index 29e467d9d..379195038 100644 --- a/handlers/external/handler.go +++ b/handlers/external/handler.go @@ -366,7 +366,7 @@ func (h *handler) Send(ctx context.Context, msg courier.MsgOut, res *courier.Sen } if responseCheck != "" && !strings.Contains(string(respBody), responseCheck) { - return courier.ErrResponseUnexpected + return courier.ErrFailedWithReason("mt-response-check", fmt.Sprintf("response not containing '%s'", responseCheck)) } } diff --git a/handlers/external/handler_test.go b/handlers/external/handler_test.go index ba48779e7..b68a2f90e 100644 --- a/handlers/external/handler_test.go +++ b/handlers/external/handler_test.go @@ -834,7 +834,7 @@ var xmlSendWithResponseContentTestCases = []OutgoingTestCase{ Headers: map[string]string{"Content-Type": "text/xml; charset=utf-8"}, Body: `+250788383383Error Message2020`, }}, - ExpectedError: courier.ErrResponseUnexpected, + ExpectedError: courier.ErrFailedWithReason("mt-response-check", "response not containing '0'"), }, { Label: "Send Attachment",