Skip to content

change required to execution to pass through serialised error#2120

Draft
ettec wants to merge 1 commit into
mainfrom
sdk-typed-errors
Draft

change required to execution to pass through serialised error#2120
ettec wants to merge 1 commit into
mainfrom
sdk-typed-errors

Conversation

@ettec
Copy link
Copy Markdown
Contributor

@ettec ettec commented Jun 3, 2026

No description provided.

Copilot AI review requested due to automatic review settings June 3, 2026 16:59
@ettec ettec requested a review from a team as a code owner June 3, 2026 16:59
@ettec ettec marked this pull request as draft June 3, 2026 17:00
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Jun 3, 2026

👋 ettec, 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
Copy Markdown

github-actions Bot commented Jun 3, 2026

📊 API Diff Results

No changes detected for module github.com/smartcontractkit/chainlink-common

View full report

Copy link
Copy Markdown
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 the WASM workflow host execution path to propagate structured capability errors (from pkg/capabilities/errors) across the async capability call boundary, so consumers can reliably deserialize and handle them instead of only receiving err.Error().

Changes:

  • Detect caperrors.Error returned by ExecutionHelper.CallCapability and serialize it via SerializeToString().
  • Fall back to passing a plain string error for non-capability errors (current PR behavior).

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

Comment on lines +52 to +57
errString := err.Error()

var caperror caperrors.Error
if errors.As(err, &caperror) {
errString = caperror.SerializeToString()
}
Comment on lines 51 to 63
if err != nil {
errString := err.Error()

var caperror caperrors.Error
if errors.As(err, &caperror) {
errString = caperror.SerializeToString()
}
resp = &sdkpb.CapabilityResponse{
Response: &sdkpb.CapabilityResponse_Error{
Error: err.Error(),
Error: errString,
},
}
}
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.

2 participants