change required to execution to pass through serialised error#2120
change required to execution to pass through serialised error#2120ettec wants to merge 1 commit into
Conversation
|
👋 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! |
📊 API Diff Results
|
There was a problem hiding this comment.
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.Errorreturned byExecutionHelper.CallCapabilityand serialize it viaSerializeToString(). - 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.
| errString := err.Error() | ||
|
|
||
| var caperror caperrors.Error | ||
| if errors.As(err, &caperror) { | ||
| errString = caperror.SerializeToString() | ||
| } |
| 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, | ||
| }, | ||
| } | ||
| } |
No description provided.