Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion pkg/workflows/wasm/host/execution.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,15 @@ package host
import (
"context"
"encoding/binary"
"errors"
"fmt"
"sync"
"time"

"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"
Expand Down Expand Up @@ -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()
}
Comment on lines +52 to +57
resp = &sdkpb.CapabilityResponse{
Response: &sdkpb.CapabilityResponse_Error{
Error: err.Error(),
Error: errString,
},
}
}
Comment on lines 51 to 63
Expand Down
Loading