Skip to content

chore: handle errors in wsproxy server for cli using buildinfo #11584

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

Merged
merged 11 commits into from
Jan 11, 2024
Merged
Changes from 1 commit
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
Prev Previous commit
Next Next commit
example with wrapped
  • Loading branch information
Emyrk committed Jan 11, 2024
commit 789d3df9f90f16d98209a38aa619273ef632c926
5 changes: 2 additions & 3 deletions cli/errors.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,12 +70,11 @@ func (RootCmd) errorExample() *clibase.Cmd {
{
Use: "multi-error",
Handler: func(inv *clibase.Invocation) error {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should we hide this command? There's no reason a user would ever need to use this.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is hidden up the stack:

Hidden: true,

return errors.Join(
return xerrors.Errorf("wrapped %w", errors.Join(
xerrors.Errorf("first error: %w", errorWithStackTrace()),
xerrors.Errorf("second error: %w", errorWithStackTrace()),
apiErrorNoHelper,
)

))
},
},
{
Expand Down