Skip to content

Commit

Permalink
feat: add end-user errors on CreateExecution error (#369)
Browse files Browse the repository at this point in the history
Because

- instill-ai/connector#113 introduced an
[end-user
error](https://github.com/instill-ai/connector/pull/113/files#diff-ccd0d26c1e8d29bcffb2741e853132db31305425679cdc929b82eb8af6c3824cR79)
in a `CreateExecution` function, which isn't displayed correctly in
console.

This commit

- Checks the response from `CreateExecution` and adds any potential
end-user error as a Temporal error message.
  • Loading branch information
jvallesm authored Jan 26, 2024
1 parent cf2e5ca commit b72ac08
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/worker/workflow.go
Original file line number Diff line number Diff line change
Expand Up @@ -598,7 +598,7 @@ func (w *worker) ConnectorActivity(ctx context.Context, param *ExecuteConnectorA

execution, err := w.connector.CreateExecution(uuid.FromStringOrNil(con.Uid), param.Task, configuration, logger)
if err != nil {
return nil, err
return nil, w.toApplicationError(err, param.ID, ConnectorActivityError)
}
compOutputs, err := execution.ExecuteWithValidation(compInputs)
if err != nil {
Expand Down

0 comments on commit b72ac08

Please sign in to comment.