From 3a9949cb24e24abd736f8469fe622e4078a49436 Mon Sep 17 00:00:00 2001 From: Matthew Pendrey Date: Wed, 3 Jun 2026 17:26:38 +0100 Subject: [PATCH] update execution --- pkg/workflows/wasm/host/execution.go | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/pkg/workflows/wasm/host/execution.go b/pkg/workflows/wasm/host/execution.go index ec9fd1bbfd..e3ed7b4397 100644 --- a/pkg/workflows/wasm/host/execution.go +++ b/pkg/workflows/wasm/host/execution.go @@ -3,6 +3,7 @@ package host import ( "context" "encoding/binary" + "errors" "fmt" "sync" "time" @@ -10,6 +11,7 @@ import ( "github.com/bytecodealliance/wasmtime-go/v28" "google.golang.org/protobuf/proto" + caperrors "github.com/smartcontractkit/chainlink-common/pkg/capabilities/errors" "github.com/smartcontractkit/chainlink-common/pkg/config" sdkpb "github.com/smartcontractkit/chainlink-protos/cre/go/sdk" wfpb "github.com/smartcontractkit/chainlink-protos/workflows/go/v2" @@ -47,9 +49,15 @@ func (e *execution[T]) callCapAsync(ctx context.Context, req *sdkpb.CapabilityRe resp, err := e.executor.CallCapability(ctx, req) 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, }, } }