MCPcopy Create free account
hub / github.com/cloudfoundry/multiapps-cli-plugin / NewClientError

Function NewClientError

clients/baseclient/client_error.go:23–37  ·  view source on GitHub ↗
(err error)

Source from the content-addressed store, hash-verified

21}
22
23func NewClientError(err error) error {
24 if err == nil {
25 return nil
26 }
27 ae, ok := err.(*runtime.APIError)
28 if ok {
29 response := ae.Response.(runtime.ClientResponse)
30 return &ClientError{Code: ae.Code, Status: response.Message(), Description: response.Message()}
31 }
32 response, ok := err.(*ErrorResponse)
33 if ok {
34 return &ClientError{Code: response.Code, Status: response.Status, Description: response.Payload}
35 }
36 return err
37}
38
39func BuildErrorResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
40 result := &ErrorResponse{

Callers 15

executeInternalMethod · 0.92
executeInternalMethod · 0.92
MonitorMethod · 0.92
executeInternalMethod · 0.92
downloadLogsForProcessFunction · 0.92
executeInternalMethod · 0.92
executeInternalMethod · 0.92
executeInternalMethod · 0.92
UploadFilesMethod · 0.92
isFileAlreadyUploadedMethod · 0.92

Calls 1

MessageMethod · 0.80

Tested by

no test coverage detected