From 198e0d25a1345e74f265a447eedae377c4bab851 Mon Sep 17 00:00:00 2001 From: Owen Cabalceta Date: Tue, 22 Oct 2024 13:18:49 -0400 Subject: [PATCH] patch: replace `genericDoReason` error reason with `unknown` - `unknown` will be used for failures that don't fit existing categories --- eventDispatcher.go | 6 +----- metrics.go | 1 - workerPool.go | 2 +- 3 files changed, 2 insertions(+), 7 deletions(-) diff --git a/eventDispatcher.go b/eventDispatcher.go index 5f27e68..54e9cc8 100644 --- a/eventDispatcher.go +++ b/eventDispatcher.go @@ -314,9 +314,5 @@ func getDroppedMessageReason(err error) string { } // check for http `Do` related errors - if reason := getDoErrReason(err); reason != genericDoReason { - return reason - } - - return unknown + return getDoErrReason(err) } diff --git a/metrics.go b/metrics.go index 48be8dc..96932ac 100644 --- a/metrics.go +++ b/metrics.go @@ -70,7 +70,6 @@ const ( unroutableDestinationReason = "unroutable_destination" encodeErrReason = "encoding_err" fullQueueReason = "full outbound queue" - genericDoReason = "do_error" deadlineExceededReason = "context_deadline_exceeded" contextCanceledReason = "context_canceled" addressErrReason = "address_error" diff --git a/workerPool.go b/workerPool.go index 4117117..d6e59ef 100644 --- a/workerPool.go +++ b/workerPool.go @@ -144,5 +144,5 @@ func getDoErrReason(err error) string { } } - return genericDoReason + return unknown }