-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix prom reporter throwing an error when TXM is disabled #16058
base: develop
Are you sure you want to change the base?
Conversation
I see you updated files related to
|
Quality Gate passedIssues Measures |
@@ -92,6 +93,9 @@ func (pr *prometheusReporter) reportPendingEthTxes(ctx context.Context, evmChain | |||
|
|||
unconfirmed, err := txm.CountTransactionsByState(ctx, txmgrcommon.TxUnconfirmed) | |||
if err != nil { | |||
if strings.Contains(err.Error(), "disabled") { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it possible to use errors.Is
?
if strings.Contains(err.Error(), "disabled") { | |
if errors.Is(err, disabledErr) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh it looks like that would requires a framework update
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
BCFR-1103