-
Notifications
You must be signed in to change notification settings - Fork 433
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
Generate call stack for sdk error and preserve stack trace #3310
Conversation
acf2cd4
to
884f9ae
Compare
sdk/error.go
Outdated
} | ||
fallthrough | ||
case 's': | ||
io.WriteString(s, fmt.Sprintf("%s: %s", w.stack.String(), w.Cause().Error())) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Error return value of io.WriteString
is not checked
7fd38e3
to
2b27275
Compare
engine/service/http.go
Outdated
} | ||
|
||
_ = WriteJSON(w, sdkErr, errProcessed.Status) | ||
// safely ignore error returned by WriteJSON | ||
WriteJSON(w, httpErr, httpErr.Status) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Error return value of WriteJSON
is not checked
438368e
to
4960938
Compare
4960938
to
5141c27
Compare
… print generated call stack
…ow uuid of error in ctl
5dec0b0
to
7890e36
Compare
7890e36
to
0a6b710
Compare
CDS Report build-ui#6240.0 ✘
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM,
you should have a look in the worker commands error management, it's a mess
cli/cobra.go
Outdated
@@ -14,6 +14,7 @@ import ( | |||
|
|||
"github.com/fsamin/go-dump" | |||
"github.com/olekukonko/tablewriter" | |||
"github.com/ovh/cds/sdk" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
bad import position
engine/api/error.go
Outdated
"time" | ||
|
||
"github.com/gorilla/mux" | ||
"github.com/ovh/cds/sdk" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
bad import position
@ovh/cds