Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Only report error when error is present #124

Merged
merged 2 commits into from
Nov 9, 2023
Merged
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
8 changes: 6 additions & 2 deletions internal/step/plugin/provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -270,8 +270,12 @@ func (p *pluginProvider) LoadSchema(inputs map[string]any, _ map[string][]byte)
cancel()
// Close it. This allows it go get the error messages.
deployerErr := pluginConnector.Close()
return nil, fmt.Errorf("failed to read plugin schema from '%s' (%w). Deployer close error: (%s)",
pluginSource, err, deployerErr.Error())
if deployerErr != nil {
return nil, fmt.Errorf("failed to read plugin schema from '%s' (%w). Deployer close error: (%s)",
pluginSource, err, deployerErr.Error())
}
return nil, fmt.Errorf("failed to read plugin schema from '%s' (%w)",
pluginSource, err)
}
// Tell the server that the client is done
if err := transport.Close(); err != nil {
Expand Down