8000 chore: More UI friendly errors by Emyrk · Pull Request #1994 · coder/coder · GitHub
[go: up one dir, main page]

Skip to content

chore: More UI friendly errors #1994

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 23 commits into from
Jun 3, 2022
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
Add internal error to the cli
  • Loading branch information
< 9DA2 a class="avatar avatar-user" style="width:20px;height:20px;" data-test-selector="commits-avatar-stack-avatar-link" data-hovercard-type="user" data-hovercard-url="/users/Emyrk/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="/Emyrk"> @Emyrk
Emyrk committed Jun 3, 2022
commit 6b08a08b30720014d773f9f007f3100b64469768
3 changes: 3 additions & 0 deletions codersdk/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,9 @@ func (e *Error) Error() string {
if e.Helper != "" {
_, _ = fmt.Fprintf(&builder, ": %s", e.Helper)
}
if e.Internal != "" {
_, _ = fmt.Fprintf(&builder, "\n\tError: %s", e.Internal)
}
for _, err := range e.Errors {
_, _ = fmt.Fprintf(&builder, "\n\t%s: %s", err.Field, err.Detail)
}
Expand Down
0