Skip to content

Commit

Permalink
patch: replace genericDoReason error reason with unknown
Browse files Browse the repository at this point in the history
- `unknown` will be used for failures that don't fit existing categories
  • Loading branch information
denopink committed Oct 22, 2024
1 parent 7b395b3 commit 198e0d2
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 7 deletions.
6 changes: 1 addition & 5 deletions eventDispatcher.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
1 change: 0 additions & 1 deletion metrics.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion workerPool.go
Original file line number Diff line number Diff line change
Expand Up @@ -144,5 +144,5 @@ func getDoErrReason(err error) string {
}
}

return genericDoReason
return unknown
}

0 comments on commit 198e0d2

Please sign in to comment.