Skip to content

Commit c12bba4

Browse files
fix(enterprise/cli): preserve actual error when getting provisioner key details (#20813)
Fixes #20781 Previously, when `GetProvisionerKey()` failed, the actual error was swallowed: ``` error: unable to get provisioner key details ``` Now the actual error is preserved using error wrapping, so users can see the real cause (e.g., 404 Not Found, connection refused, invalid key, etc.): ``` error: unable to get provisioner key details: GET https://...: 404 Not Found ``` This makes it much easier to diagnose configuration issues. --- *Generated by [mux](https://cmux.io)*
1 parent 158243d commit c12bba4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

enterprise/cli/provisionerdaemonstart.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ func (r *RootCmd) provisionerDaemonStart() *serpent.Command {
107107
if provisionerKey != "" {
108108
pkDetails, err := client.GetProvisionerKey(ctx, provisionerKey)
109109
if err != nil {
110-
return xerrors.New("unable to get provisioner key details")
110+
return xerrors.Errorf("unable to get provisioner key details: %w", err)
111111
}
112112

113113
for k, v := range pkDetails.Tags {

0 commit comments

Comments
 (0)