Skip to content

Commit 1347d7f

Browse files
committed
added nohelper error
1 parent f2d978b commit 1347d7f

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

cli/errors.go

+4
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,9 @@ func (RootCmd) errorExample() *clibase.Cmd {
4444
//nolint:errorlint,forcetypeassert
4545
apiError.(*codersdk.Error).Helper = "Have you tried turning it off and on again?"
4646

47+
apiErrorNoHelper := apiError.(*codersdk.Error)
48+
apiErrorNoHelper.Helper = ""
49+
4750
// Some flags
4851
var magicWord clibase.String
4952

@@ -70,6 +73,7 @@ func (RootCmd) errorExample() *clibase.Cmd {
7073
return errors.Join(
7174
xerrors.Errorf("first error: %w", errorWithStackTrace()),
7275
xerrors.Errorf("second error: %w", errorWithStackTrace()),
76+
apiErrorNoHelper,
7377
)
7478

7579
},

0 commit comments

Comments
 (0)