Skip to content

Commit

Permalink
Tag validation errors for non-relevant messages (#766)
Browse files Browse the repository at this point in the history
Add the missing custom tag for `ErrValidationNotRelevant` type as
`invalid_not_relevant`.
  • Loading branch information
masih authored Nov 29, 2024
1 parent 483e58b commit 9b04b56
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions gpbft/metrics.go
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,8 @@ func metricAttributeFromError(err error) attribute.KeyValue {
v = "invalid_wrong_base"
case errors.Is(err, ErrValidationWrongSupplement):
v = "invalid_wrong_supp"
case errors.Is(err, ErrValidationNotRelevant):
v = "invalid_not_relevant"
case errors.As(err, &ValidationError{}):
v = "type_invalid"
case errors.Is(err, ErrReceivedWrongInstance):
Expand Down

0 comments on commit 9b04b56

Please sign in to comment.