MCPcopy Create free account
hub / github.com/Scalingo/cli / newReportError

Function newReportError

cmd/error.go:155–171  ·  view source on GitHub ↗
(currentUser *scalingo.User, err error)

Source from the content-addressed store, hash-verified

153}
154
155func newReportError(currentUser *scalingo.User, err error) *ReportError {
156 r := &ReportError{
157 Time: time.Now(),
158 User: currentUser,
159 Error: err,
160 Command: strings.Join(os.Args, " "),
161 Version: config.Version,
162 System: newSysinfo(),
163 }
164
165 var requestFailedError *httpclient.RequestFailedError
166 if errors.As(err, &requestFailedError) {
167 r.FailedRequest = requestFailedError.Req.HTTPRequest
168 }
169
170 return r
171}
172
173func newSysinfo() Sysinfo {
174 var username string

Callers 1

displayErrorFunction · 0.85

Calls 1

newSysinfoFunction · 0.85

Tested by

no test coverage detected