Skip to content

Conversation

@ettec
Copy link
Contributor

@ettec ettec commented Nov 21, 2025

This PR migrates capability error handling from a legacy system using RemoteReportableError and ReportableUserError to a new structured error system with explicit error codes, visibility levels (public/private), and origin types (system/user). The change improves error categorization and enables better error reporting across distributed nodes.

Key changes:

Introduces a new caperrors package with structured error types including error codes, visibility, and origin
Updates error serialization/deserialization to support the new format while maintaining backwards compatibility
Replaces legacy error wrapper types with the new capability error system
Updates all generated executable capability server interfaces to return caperrors.Error instead of generic error

@github-actions
Copy link

github-actions bot commented Nov 21, 2025

⚠️ API Diff Results - Breaking changes detected

📦 Module: github-com-smartcontractkit-chainlink-common

🔴 Breaking Changes (39)

pkg/capabilities (12)
  • IsRemoteReportableErrorMessage — 🗑️ Removed

  • IsReportableUserErrorMessage — 🗑️ Removed

  • NewRemoteReportableError — 🗑️ Removed

  • NewReportableUserError — 🗑️ Removed

  • PrePendRemoteReportableErrorIdentifier — 🗑️ Removed

  • PrePendRemoteUnreportableErrorIdentifier — 🗑️ Removed

  • PrePendReportableUserErrorIdentifier — 🗑️ Removed

  • RemoteReportableError — 🗑️ Removed

  • RemoveRemoteReportableErrorIdentifier — 🗑️ Removed

  • RemoveRemoteUnreportableErrorIdentifier — 🗑️ Removed

  • RemoveReportableUserErrorIdentifier — 🗑️ Removed

  • ReportableUserError — 🗑️ Removed

pkg/capabilities/v2/actions/confidentialhttp/server.ClientCapability (1)
  • SendRequests — Type changed:
func(
  context.Context, 
  github.com/smartcontractkit/chainlink-common/pkg/capabilities.RequestMetadata, 
  *github.com/smartcontractkit/chainlink-common/pkg/capabilities/v2/actions/confidentialhttp.EnclaveActionInput
)
- (*github.com/smartcontractkit/chainlink-common/pkg/capabilities.ResponseAndMetadata[*github.com/smartcontractkit/chainlink-common/pkg/capabilities/v2/actions/confidentialhttp.HTTPEnclaveResponseData], error)
+ (*github.com/smartcontractkit/chainlink-common/pkg/capabilities.ResponseAndMetadata[*github.com/smartcontractkit/chainlink-common/pkg/capabilities/v2/actions/confidentialhttp.HTTPEnclaveResponseData], github.com/smartcontractkit/chainlink-common/pkg/capabilities/errors.Error)
pkg/capabilities/v2/actions/http/server.ClientCapability (1)
  • SendRequest — Type changed:
func(
  context.Context, 
  github.com/smartcontractkit/chainlink-common/pkg/capabilities.RequestMetadata, 
  *github.com/smartcontractkit/chainlink-common/pkg/capabilities/v2/actions/http.Request
)
- (*github.com/smartcontractkit/chainlink-common/pkg/capabilities.ResponseAndMetadata[*github.com/smartcontractkit/chainlink-common/pkg/capabilities/v2/actions/http.Response], error)
+ (*github.com/smartcontractkit/chainlink-common/pkg/capabilities.ResponseAndMetadata[*github.com/smartcontractkit/chainlink-common/pkg/capabilities/v2/actions/http.Response], github.com/smartcontractkit/chainlink-common/pkg/capabilities/errors.Error)
pkg/capabilities/v2/chain-capabilities/evm/server.ClientCapability (8)
  • BalanceAt — Type changed:
func(
  context.Context, 
  github.com/smartcontractkit/chainlink-common/pkg/capabilities.RequestMetadata, 
  *github.com/smartcontractkit/chainlink-common/pkg/capabilities/v2/chain-capabilities/evm.BalanceAtRequest
)
- (*github.com/smartcontractkit/chainlink-common/pkg/capabilities.ResponseAndMetadata[*github.com/smartcontractkit/chainlink-common/pkg/capabilities/v2/chain-capabilities/evm.BalanceAtReply], error)
+ (*github.com/smartcontractkit/chainlink-common/pkg/capabilities.ResponseAndMetadata[*github.com/smartcontractkit/chainlink-common/pkg/capabilities/v2/chain-capabilities/evm.BalanceAtReply], github.com/smartcontractkit/chainlink-common/pkg/capabilities/errors.Error)
  • CallContract — Type changed:
func(
  context.Context, 
  github.com/smartcontractkit/chainlink-common/pkg/capabilities.RequestMetadata, 
  *github.com/smartcontractkit/chainlink-common/pkg/capabilities/v2/chain-capabilities/evm.CallContractRequest
)
- (*github.com/smartcontractkit/chainlink-common/pkg/capabilities.ResponseAndMetadata[*github.com/smartcontractkit/chainlink-common/pkg/capabilities/v2/chain-capabilities/evm.CallContractReply], error)
+ (*github.com/smartcontractkit/chainlink-common/pkg/capabilities.ResponseAndMetadata[*github.com/smartcontractkit/chainlink-common/pkg/capabilities/v2/chain-capabilities/evm.CallContractReply], github.com/smartcontractkit/chainlink-common/pkg/capabilities/errors.Error)
  • EstimateGas — Type changed:
func(
  context.Context, 
  github.com/smartcontractkit/chainlink-common/pkg/capabilities.RequestMetadata, 
  *github.com/smartcontractkit/chainlink-common/pkg/capabilities/v2/chain-capabilities/evm.EstimateGasRequest
)
- (*github.com/smartcontractkit/chainlink-common/pkg/capabilities.ResponseAndMetadata[*github.com/smartcontractkit/chainlink-common/pkg/capabilities/v2/chain-capabilities/evm.EstimateGasReply], error)
+ (*github.com/smartcontractkit/chainlink-common/pkg/capabilities.ResponseAndMetadata[*github.com/smartcontractkit/chainlink-common/pkg/capabilities/v2/chain-capabilities/evm.EstimateGasReply], github.com/smartcontractkit/chainlink-common/pkg/capabilities/errors.Error)
  • FilterLogs — Type changed:
func(
  context.Context, 
  github.com/smartcontractkit/chainlink-common/pkg/capabilities.RequestMetadata, 
  *github.com/smartcontractkit/chainlink-common/pkg/capabilities/v2/chain-capabilities/evm.FilterLogsRequest
)
- (*github.com/smartcontractkit/chainlink-common/pkg/capabilities.ResponseAndMetadata[*github.com/smartcontractkit/chainlink-common/pkg/capabilities/v2/chain-capabilities/evm.FilterLogsReply], error)
+ (*github.com/smartcontractkit/chainlink-common/pkg/capabilities.ResponseAndMetadata[*github.com/smartcontractkit/chainlink-common/pkg/capabilities/v2/chain-capabilities/evm.FilterLogsReply], github.com/smartcontractkit/chainlink-common/pkg/capabilities/errors.Error)
  • GetTransactionByHash — Type changed:
func(
  context.Context, 
  github.com/smartcontractkit/chainlink-common/pkg/capabilities.RequestMetadata, 
  *github.com/smartcontractkit/chainlink-common/pkg/capabilities/v2/chain-capabilities/evm.GetTransactionByHashRequest
)
- (*github.com/smartcontractkit/chainlink-common/pkg/capabilities.ResponseAndMetadata[*github.com/smartcontractkit/chainlink-common/pkg/capabilities/v2/chain-capabilities/evm.GetTransactionByHashReply], error)
+ (*github.com/smartcontractkit/chainlink-common/pkg/capabilities.ResponseAndMetadata[*github.com/smartcontractkit/chainlink-common/pkg/capabilities/v2/chain-capabilities/evm.GetTransactionByHashReply], github.com/smartcontractkit/chainlink-common/pkg/capabilities/errors.Error)
  • GetTransactionReceipt — Type changed:
func(
  context.Context, 
  github.com/smartcontractkit/chainlink-common/pkg/capabilities.RequestMetadata, 
  *github.com/smartcontractkit/chainlink-common/pkg/capabilities/v2/chain-capabilities/evm.GetTransactionReceiptRequest
)
- (*github.com/smartcontractkit/chainlink-common/pkg/capabilities.ResponseAndMetadata[*github.com/smartcontractkit/chainlink-common/pkg/capabilities/v2/chain-capabilities/evm.GetTransactionReceiptReply], error)
+ (*github.com/smartcontractkit/chainlink-common/pkg/capabilities.ResponseAndMetadata[*github.com/smartcontractkit/chainlink-common/pkg/capabilities/v2/chain-capabilities/evm.GetTransactionReceiptReply], github.com/smartcontractkit/chainlink-common/pkg/capabilities/errors.Error)
  • HeaderByNumber — Type changed:
func(
  context.Context, 
  github.com/smartcontractkit/chainlink-common/pkg/capabilities.RequestMetadata, 
  *github.com/smartcontractkit/chainlink-common/pkg/capabilities/v2/chain-capabilities/evm.HeaderByNumberRequest
)
- (*github.com/smartcontractkit/chainlink-common/pkg/capabilities.ResponseAndMetadata[*github.com/smartcontractkit/chainlink-common/pkg/capabilities/v2/chain-capabilities/evm.HeaderByNumberReply], error)
+ (*github.com/smartcontractkit/chainlink-common/pkg/capabilities.ResponseAndMetadata[*github.com/smartcontractkit/chainlink-common/pkg/capabilities/v2/chain-capabilities/evm.HeaderByNumberReply], github.com/smartcontractkit/chainlink-common/pkg/capabilities/errors.Error)
  • WriteReport — Type changed:
func(
  context.Context, 
  github.com/smartcontractkit/chainlink-common/pkg/capabilities.RequestMetadata, 
  *github.com/smartcontractkit/chainlink-common/pkg/capabilities/v2/chain-capabilities/evm.WriteReportRequest
)
- (*github.com/smartcontractkit/chainlink-common/pkg/capabilities.ResponseAndMetadata[*github.com/smartcontractkit/chainlink-common/pkg/capabilities/v2/chain-capabilities/evm.WriteReportReply], error)
+ (*github.com/smartcontractkit/chainlink-common/pkg/capabilities.ResponseAndMetadata[*github.com/smartcontractkit/chainlink-common/pkg/capabilities/v2/chain-capabilities/evm.WriteReportReply], github.com/smartcontractkit/chainlink-common/pkg/capabilities/errors.Error)
pkg/capabilities/v2/chain-capabilities/solana/server.ClientCapability (9)
  • GetAccountInfoWithOpts — Type changed:
func(
  context.Context, 
  github.com/smartcontractkit/chainlink-common/pkg/capabilities.RequestMetadata, 
  *github.com/smartcontractkit/chainlink-common/pkg/capabilities/v2/chain-capabilities/solana.GetAccountInfoWithOptsRequest
)
- (*github.com/smartcontractkit/chainlink-common/pkg/capabilities.ResponseAndMetadata[*github.com/smartcontractkit/chainlink-common/pkg/capabilities/v2/chain-capabilities/solana.GetAccountInfoWithOptsReply], error)
+ (*github.com/smartcontractkit/chainlink-common/pkg/capabilities.ResponseAndMetadata[*github.com/smartcontractkit/chainlink-common/pkg/capabilities/v2/chain-capabilities/solana.GetAccountInfoWithOptsReply], github.com/smartcontractkit/chainlink-common/pkg/capabilities/errors.Error)
  • GetBalance — Type changed:
func(
  context.Context, 
  github.com/smartcontractkit/chainlink-common/pkg/capabilities.RequestMetadata, 
  *github.com/smartcontractkit/chainlink-common/pkg/capabilities/v2/chain-capabilities/solana.GetBalanceRequest
)
- (*github.com/smartcontractkit/chainlink-common/pkg/capabilities.ResponseAndMetadata[*github.com/smartcontractkit/chainlink-common/pkg/capabilities/v2/chain-capabilities/solana.GetBalanceReply], error)
+ (*github.com/smartcontractkit/chainlink-common/pkg/capabilities.ResponseAndMetadata[*github.com/smartcontractkit/chainlink-common/pkg/capabilities/v2/chain-capabilities/solana.GetBalanceReply], github.com/smartcontractkit/chainlink-common/pkg/capabilities/errors.Error)
  • GetBlock — Type changed:
func(
  context.Context, 
  github.com/smartcontractkit/chainlink-common/pkg/capabilities.RequestMetadata, 
  *github.com/smartcontractkit/chainlink-common/pkg/capabilities/v2/chain-capabilities/solana.GetBlockRequest
)
- (*github.com/smartcontractkit/chainlink-common/pkg/capabilities.ResponseAndMetadata[*github.com/smartcontractkit/chainlink-common/pkg/capabilities/v2/chain-capabilities/solana.GetBlockReply], error)
+ (*github.com/smartcontractkit/chainlink-common/pkg/capabilities.ResponseAndMetadata[*github.com/smartcontractkit/chainlink-common/pkg/capabilities/v2/chain-capabilities/solana.GetBlockReply], github.com/smartcontractkit/chainlink-common/pkg/capabilities/errors.Error)
  • GetFeeForMessage — Type changed:
func(
  context.Context, 
  github.com/smartcontractkit/chainlink-common/pkg/capabilities.RequestMetadata, 
  *github.com/smartcontractkit/chainlink-common/pkg/capabilities/v2/chain-capabilities/solana.GetFeeForMessageRequest
)
- (*github.com/smartcontractkit/chainlink-common/pkg/capabilities.ResponseAndMetadata[*github.com/smartcontractkit/chainlink-common/pkg/capabilities/v2/chain-capabilities/solana.GetFeeForMessageReply], error)
+ (*github.com/smartcontractkit/chainlink-common/pkg/capabilities.ResponseAndMetadata[*github.com/smartcontractkit/chainlink-common/pkg/capabilities/v2/chain-capabilities/solana.GetFeeForMessageReply], github.com/smartcontractkit/chainlink-common/pkg/capabilities/errors.Error)
  • GetMultipleAccountsWithOpts — Type changed:
func(
  context.Context, 
  github.com/smartcontractkit/chainlink-common/pkg/capabilities.RequestMetadata, 
  *github.com/smartcontractkit/chainlink-common/pkg/capabilities/v2/chain-capabilities/solana.GetMultipleAccountsWithOptsRequest
)
- (*github.com/smartcontractkit/chainlink-common/pkg/capabilities.ResponseAndMetadata[*github.com/smartcontractkit/chainlink-common/pkg/capabilities/v2/chain-capabilities/solana.GetMultipleAccountsWithOptsReply], error)
+ (*github.com/smartcontractkit/chainlink-common/pkg/capabilities.ResponseAndMetadata[*github.com/smartcontractkit/chainlink-common/pkg/capabilities/v2/chain-capabilities/solana.GetMultipleAccountsWithOptsReply], github.com/smartcontractkit/chainlink-common/pkg/capabilities/errors.Error)
  • GetSignatureStatuses — Type changed:
func(
  context.Context, 
  github.com/smartcontractkit/chainlink-common/pkg/capabilities.RequestMetadata, 
  *github.com/smartcontractkit/chainlink-common/pkg/capabilities/v2/chain-capabilities/solana.GetSignatureStatusesRequest
)
- (*github.com/smartcontractkit/chainlink-common/pkg/capabilities.ResponseAndMetadata[*github.com/smartcontractkit/chainlink-common/pkg/capabilities/v2/chain-capabilities/solana.GetSignatureStatusesReply], error)
+ (*github.com/smartcontractkit/chainlink-common/pkg/capabilities.ResponseAndMetadata[*github.com/smartcontractkit/chainlink-common/pkg/capabilities/v2/chain-capabilities/solana.GetSignatureStatusesReply], github.com/smartcontractkit/chainlink-common/pkg/capabilities/errors.Error)
  • GetSlotHeight — Type changed:
func(
  context.Context, 
  github.com/smartcontractkit/chainlink-common/pkg/capabilities.RequestMetadata, 
  *github.com/smartcontractkit/chainlink-common/pkg/capabilities/v2/chain-capabilities/solana.GetSlotHeightRequest
)
- (*github.com/smartcontractkit/chainlink-common/pkg/capabilities.ResponseAndMetadata[*github.com/smartcontractkit/chainlink-common/pkg/capabilities/v2/chain-capabilities/solana.GetSlotHeightReply], error)
+ (*github.com/smartcontractkit/chainlink-common/pkg/capabilities.ResponseAndMetadata[*github.com/smartcontractkit/chainlink-common/pkg/capabilities/v2/chain-capabilities/solana.GetSlotHeightReply], github.com/smartcontractkit/chainlink-common/pkg/capabilities/errors.Error)
  • GetTransaction — Type changed:
func(
  context.Context, 
  github.com/smartcontractkit/chainlink-common/pkg/capabilities.RequestMetadata, 
  *github.com/smartcontractkit/chainlink-common/pkg/capabilities/v2/chain-capabilities/solana.GetTransactionRequest
)
- (*github.com/smartcontractkit/chainlink-common/pkg/capabilities.ResponseAndMetadata[*github.com/smartcontractkit/chainlink-common/pkg/capabilities/v2/chain-capabilities/solana.GetTransactionReply], error)
+ (*github.com/smartcontractkit/chainlink-common/pkg/capabilities.ResponseAndMetadata[*github.com/smartcontractkit/chainlink-common/pkg/capabilities/v2/chain-capabilities/solana.GetTransactionReply], github.com/smartcontractkit/chainlink-common/pkg/capabilities/errors.Error)
  • WriteReport — Type changed:
func(
  context.Context, 
  github.com/smartcontractkit/chainlink-common/pkg/capabilities.RequestMetadata, 
  *github.com/smartcontractkit/chainlink-common/pkg/capabilities/v2/chain-capabilities/solana.WriteReportRequest
)
- (*github.com/smartcontractkit/chainlink-common/pkg/capabilities.ResponseAndMetadata[*github.com/smartcontractkit/chainlink-common/pkg/capabilities/v2/chain-capabilities/solana.WriteReportReply], error)
+ (*github.com/smartcontractkit/chainlink-common/pkg/capabilities.ResponseAndMetadata[*github.com/smartcontractkit/chainlink-common/pkg/capabilities/v2/chain-capabilities/solana.WriteReportReply], github.com/smartcontractkit/chainlink-common/pkg/capabilities/errors.Error)
pkg/capabilities/v2/consensus/server.ConsensusCapability (2)
  • Report — Type changed:
func(
  context.Context, 
  github.com/smartcontractkit/chainlink-common/pkg/capabilities.RequestMetadata, 
  *github.com/smartcontractkit/chainlink-protos/cre/go/sdk.ReportRequest
)
- (*github.com/smartcontractkit/chainlink-common/pkg/capabilities.ResponseAndMetadata[*github.com/smartcontractkit/chainlink-protos/cre/go/sdk.ReportResponse], error)
+ (*github.com/smartcontractkit/chainlink-common/pkg/capabilities.ResponseAndMetadata[*github.com/smartcontractkit/chainlink-protos/cre/go/sdk.ReportResponse], github.com/smartcontractkit/chainlink-common/pkg/capabilities/errors.Error)
  • Simple — Type changed:
func(
  context.Context, 
  github.com/smartcontractkit/chainlink-common/pkg/capabilities.RequestMetadata, 
  *github.com/smartcontractkit/chainlink-protos/cre/go/sdk.SimpleConsensusInputs
)
- (*github.com/smartcontractkit/chainlink-common/pkg/capabilities.ResponseAndMetadata[*github.com/smartcontractkit/chainlink-protos/cre/go/values/pb.Value], error)
+ (*github.com/smartcontractkit/chainlink-common/pkg/capabilities.ResponseAndMetadata[*github.com/smartcontractkit/chainlink-protos/cre/go/values/pb.Value], github.com/smartcontractkit/chainlink-common/pkg/capabilities/errors.Error)
pkg/capabilities/v2/protoc/pkg/test_capabilities/actionandtrigger/server.BasicCapability (1)
  • Action — Type changed:
func(
  context.Context, 
  github.com/smartcontractkit/chainlink-common/pkg/capabilities.RequestMetadata, 
  *github.com/smartcontractkit/chainlink-common/pkg/capabilities/v2/protoc/pkg/test_capabilities/actionandtrigger.Input
)
- (*github.com/smartcontractkit/chainlink-common/pkg/capabilities.ResponseAndMetadata[*github.com/smartcontractkit/chainlink-common/pkg/capabilities/v2/protoc/pkg/test_capabilities/actionandtrigger.Output], error)
+ (*github.com/smartcontractkit/chainlink-common/pkg/capabilities.ResponseAndMetadata[*github.com/smartcontractkit/chainlink-common/pkg/capabilities/v2/protoc/pkg/test_capabilities/actionandtrigger.Output], github.com/smartcontractkit/chainlink-common/pkg/capabilities/errors.Error)
pkg/capabilities/v2/protoc/pkg/test_capabilities/basicaction/server.BasicActionCapability (1)
  • PerformAction — Type changed:
func(
  context.Context, 
  github.com/smartcontractkit/chainlink-common/pkg/capabilities.RequestMetadata, 
  *github.com/smartcontractkit/chainlink-common/pkg/capabilities/v2/protoc/pkg/test_capabilities/basicaction.Inputs
)
- (*github.com/smartcontractkit/chainlink-common/pkg/capabilities.ResponseAndMetadata[*github.com/smartcontractkit/chainlink-common/pkg/capabilities/v2/protoc/pkg/test_capabilities/basicaction.Outputs], error)
+ (*github.com/smartcontractkit/chainlink-common/pkg/capabilities.ResponseAndMetadata[*github.com/smartcontractkit/chainlink-common/pkg/capabilities/v2/protoc/pkg/test_capabilities/basicaction.Outputs], github.com/smartcontractkit/chainlink-common/pkg/capabilities/errors.Error)
pkg/capabilities/v2/protoc/pkg/test_capabilities/consensus/server.ConsensusCapability (2)
  • Report — Type changed:
func(
  context.Context, 
  github.com/smartcontractkit/chainlink-common/pkg/capabilities.RequestMetadata, 
  *github.com/smartcontractkit/chainlink-protos/cre/go/sdk.ReportRequest
)
- (*github.com/smartcontractkit/chainlink-common/pkg/capabilities.ResponseAndMetadata[*github.com/smartcontractkit/chainlink-protos/cre/go/sdk.ReportResponse], error)
+ (*github.com/smartcontractkit/chainlink-common/pkg/capabilities.ResponseAndMetadata[*github.com/smartcontractkit/chainlink-protos/cre/go/sdk.ReportResponse], github.com/smartcontractkit/chainlink-common/pkg/capabilities/errors.Error)
  • Simple — Type changed:
func(
  context.Context, 
  github.com/smartcontractkit/chainlink-common/pkg/capabilities.RequestMetadata, 
  *github.com/smartcontractkit/chainlink-protos/cre/go/sdk.SimpleConsensusInputs
)
- (*github.com/smartcontractkit/chainlink-common/pkg/capabilities.ResponseAndMetadata[*github.com/smartcontractkit/chainlink-protos/cre/go/values/pb.Value], error)
+ (*github.com/smartcontractkit/chainlink-common/pkg/capabilities.ResponseAndMetadata[*github.com/smartcontractkit/chainlink-protos/cre/go/values/pb.Value], github.com/smartcontractkit/chainlink-common/pkg/capabilities/errors.Error)
pkg/capabilities/v2/protoc/pkg/test_capabilities/importclash/server.BasicActionCapability (1)
  • PerformAction — Type changed:
func(
  context.Context, 
  github.com/smartcontractkit/chainlink-common/pkg/capabilities.RequestMetadata, 
  *github.com/smartcontractkit/chainlink-common/pkg/capabilities/v2/protoc/pkg/test_capabilities/importclash/p1.Item
)
- (*github.com/smartcontractkit/chainlink-common/pkg/capabilities.ResponseAndMetadata[*github.com/smartcontractkit/chainlink-common/pkg/capabilities/v2/protoc/pkg/test_capabilities/importclash/p2.Item], error)
+ (*github.com/smartcontractkit/chainlink-common/pkg/capabilities.ResponseAndMetadata[*github.com/smartcontractkit/chainlink-common/pkg/capabilities/v2/protoc/pkg/test_capabilities/importclash/p2.Item], github.com/smartcontractkit/chainlink-common/pkg/capabilities/errors.Error)
pkg/capabilities/v2/protoc/pkg/test_capabilities/nodeaction/server.BasicActionCapability (1)
  • PerformAction — Type changed:
func(
  context.Context, 
  github.com/smartcontractkit/chainlink-common/pkg/capabilities.RequestMetadata, 
  *github.com/smartcontractkit/chainlink-common/pkg/capabilities/v2/protoc/pkg/test_capabilities/nodeaction.NodeInputs
)
- (*github.com/smartcontractkit/chainlink-common/pkg/capabilities.ResponseAndMetadata[*github.com/smartcontractkit/chainlink-common/pkg/capabilities/v2/protoc/pkg/test_capabilities/nodeaction.NodeOutputs], error)
+ (*github.com/smartcontractkit/chainlink-common/pkg/capabilities.ResponseAndMetadata[*github.com/smartcontractkit/chainlink-common/pkg/capabilities/v2/protoc/pkg/test_capabilities/nodeaction.NodeOutputs], github.com/smartcontractkit/chainlink-common/pkg/capabilities/errors.Error)

📄 View full apidiff report

@ettec ettec force-pushed the error-codes-on-reportable-capability-errors branch from ec93c6d to f2f0b46 Compare November 24, 2025 14:47
@ettec ettec force-pushed the error-codes-on-reportable-capability-errors branch from f2f0b46 to 46bd1a7 Compare November 24, 2025 14:49
@ettec ettec force-pushed the error-codes-on-reportable-capability-errors branch from 84b07f3 to d98d621 Compare November 24, 2025 17:33
@ettec ettec marked this pull request as ready for review November 24, 2025 18:04
@ettec ettec requested review from a team as code owners November 24, 2025 18:05
Copilot AI review requested due to automatic review settings November 24, 2025 18:05
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 migrates capability error handling from a legacy system using RemoteReportableError and ReportableUserError to a new structured error system with explicit error codes, visibility levels (public/private), and origin types (system/user). The change improves error categorization and enables better error reporting across distributed nodes.

Key changes:

  • Introduces a new caperrors package with structured error types including error codes, visibility, and origin
  • Updates error serialization/deserialization to support the new format while maintaining backwards compatibility
  • Replaces legacy error wrapper types with the new capability error system
  • Updates all generated capability server interfaces to return caperrors.Error instead of generic error

Reviewed changes

Copilot reviewed 22 out of 22 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
pkg/capabilities/errors/error.go Defines core error types with visibility, origin, and error code fields
pkg/capabilities/errors/error_codes.go Defines gRPC-based error codes and conversion utilities
pkg/capabilities/errors/error_serialization.go Implements error serialization for cross-node communication
pkg/capabilities/errors/error_serialization_test.go Tests serialization, deserialization, and backwards compatibility
pkg/loop/internal/core/services/capability/capabilities.go Updates error handling to use new capability error system
pkg/loop/internal/core/services/capability/capabilities_test.go Updates tests to validate new error types and properties
pkg/capabilities/remote_reportable_error.go Removes legacy error type
pkg/capabilities/reportable_user_error.go Removes legacy error type
pkg/capabilities/remote_unreportable_error.go Removes legacy error type
Various server_gen.go files Updates generated interfaces to return caperrors.Error
Comments suppressed due to low confidence (1)

pkg/capabilities/errors/error_serialization_test.go:1

  • Corrected spelling of 'compatability' to 'compatibility'.
package errors_test

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

@ettec ettec added this pull request to the merge queue Nov 25, 2025
Merged via the queue into main with commit 0b41e73 Nov 25, 2025
34 of 36 checks passed
@ettec ettec deleted the error-codes-on-reportable-capability-errors branch November 25, 2025 10:48
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