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

Function BuildErrorResponse

clients/baseclient/client_error.go:39–48  ·  view source on GitHub ↗
(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry)

Source from the content-addressed store, hash-verified

37}
38
39func BuildErrorResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
40 result := &ErrorResponse{
41 Code: response.Code(),
42 Status: response.Message(), // this isn't the body!
43 }
44 if err := result.readResponse(response, consumer, formats); err != nil {
45 return err
46 }
47 return result
48}
49
50// ErrorResponse handles error cases
51type ErrorResponse struct {

Callers 15

ReadResponseMethod · 0.92
ReadResponseMethod · 0.92
ReadResponseMethod · 0.92
ReadResponseMethod · 0.92
ReadResponseMethod · 0.92
ReadResponseMethod · 0.92
ReadResponseMethod · 0.92
ReadResponseMethod · 0.92
ReadResponseMethod · 0.92
ReadResponseMethod · 0.92
ReadResponseMethod · 0.92
ReadResponseMethod · 0.92

Calls 3

readResponseMethod · 0.95
CodeMethod · 0.80
MessageMethod · 0.80

Tested by

no test coverage detected