Skip to content

Comments

wave 1 error improvements#1838

Open
wentzeld wants to merge 4 commits intomainfrom
error-messages-wave1
Open

wave 1 error improvements#1838
wentzeld wants to merge 4 commits intomainfrom
error-messages-wave1

Conversation

@wentzeld
Copy link
Contributor

Changes: Limits error strings (rate, resource, time, bound, queue, not allowed), consensus aggregator strings (identical + reduce), config error strings,
ErrPluginUnavailable
string, and corresponding test updates
Dependencies: None
See CRE Error Improvements for context

@wentzeld wentzeld requested a review from a team as a code owner February 15, 2026 17:26
Copilot AI review requested due to automatic review settings February 15, 2026 17:26
@github-actions
Copy link

👋 wentzeld, thanks for creating this pull request!

To help reviewers, please consider creating future PRs as drafts first. This allows you to self-review and make any final changes before notifying the team.

Once you're ready, you can mark it as "Ready for review" to request feedback. Thanks!

@github-actions
Copy link

github-actions bot commented Feb 15, 2026

✅ API Diff Results - No breaking changes


📄 View full apidiff report

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates multiple error strings across limiters, consensus aggregators, config, and plugin code to provide more descriptive, user-actionable messages, along with updating the corresponding tests/examples that assert on those strings.

Changes:

  • Expanded limiter error messages (rate/resource/time/bound/queue/not allowed) and updated tests/examples accordingly.
  • Improved OCR3 consensus aggregator failure strings (identical + reduce) and updated test expectations.
  • Updated config and plugin sentinel error strings to be more descriptive.

Reviewed changes

Copilot reviewed 12 out of 12 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
pkg/settings/limits/resource_test.go Updates example output strings for resource limiter errors.
pkg/settings/limits/rate_test.go Updates example output strings for rate limiter errors.
pkg/settings/limits/gate_test.go Updates example output string for “not allowed” limiter error.
pkg/settings/limits/errors_test.go Updates expected strings for limiter error types.
pkg/settings/limits/errors.go Updates limiter error Error() messages (rate/resource/time/bound/queue/not allowed).
pkg/settings/limits/bound_test.go Updates example output string for bound limiter error.
pkg/loop/internal/goplugin/service.go Makes ErrPluginUnavailable more descriptive.
pkg/config/errors.go Improves KeyNotFoundError message clarity and quoting.
pkg/capabilities/consensus/ocr3/aggregators/reduce_test.go Updates expected reduce-aggregator error strings.
pkg/capabilities/consensus/ocr3/aggregators/reduce_aggregator.go Improves reduce-aggregator error messages with more context.
pkg/capabilities/consensus/ocr3/aggregators/identical_test.go Updates expected identical-aggregator error substring.
pkg/capabilities/consensus/ocr3/aggregators/identical.go Improves identical-aggregator consensus failure error message.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

wentzeld and others added 2 commits February 15, 2026 10:46
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
func (a *reduceAggregator) Aggregate(lggr logger.Logger, previousOutcome *types.AggregationOutcome, observations map[ocrcommon.OracleID][]values.Value, f int) (*types.AggregationOutcome, error) {
if len(observations) < 2*f+1 {
return nil, fmt.Errorf("not enough observations, have %d want %d", len(observations), 2*f+1)
return nil, fmt.Errorf("consensus failed: insufficient observations, received %d but need at least %d (2f+1, f=%d). Not enough DON nodes responded in time", len(observations), 2*f+1, f)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think we should log "consensus failed" in some of those cases (like this one). Not enough observation means we can still get enough in the next round and succeed.


func (e KeyNotFoundError) Error() string {
return fmt.Sprintf("unable to find %s key with id %s", e.KeyType, e.ID)
return fmt.Sprintf("key not found: no %s key exists with ID %q. Verify the key ID is correct and that the key has been created", e.KeyType, e.ID)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this helpful?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, this is not helpful. Less is more.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is also not really accurate. This has to do with TOML config.

)

var ErrPluginUnavailable = errors.New("plugin unavailable")
var ErrPluginUnavailable = errors.New("plugin unavailable: the capability plugin is not running or has become unresponsive. This is typically a node operator issue - the plugin may need to be restarted")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Plugins auto-restart.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please do not change this message

Suggested change
var ErrPluginUnavailable = errors.New("plugin unavailable: the capability plugin is not running or has become unresponsive. This is typically a node operator issue - the plugin may need to be restarted")
var ErrPluginUnavailable = errors.New("plugin unavailable")

)

var ErrPluginUnavailable = errors.New("plugin unavailable")
var ErrPluginUnavailable = errors.New("plugin unavailable: the capability plugin is not running or has become unresponsive. This is typically a node operator issue - the plugin may need to be restarted")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please do not change this message

Suggested change
var ErrPluginUnavailable = errors.New("plugin unavailable: the capability plugin is not running or has become unresponsive. This is typically a node operator issue - the plugin may need to be restarted")
var ErrPluginUnavailable = errors.New("plugin unavailable")

func (e ErrorNotAllowed) Error() string {
which, who := errArgs(e.Key, e.Scope, e.Tenant)
return fmt.Sprintf("%slimited%s: not allowed", which, who)
return fmt.Sprintf("%slimited%s: operation not allowed. This action is restricted by current configuration and gate settings", which, who)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this one different than the others? I think a "request..." suffix like the others would fit better

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants