github.com/wanddynosios/cli/v8@v8.7.9-0.20240221182337-1a92e3a7017f/api/cloudcontroller/ccerror/unknown_http_source_error.go (about)

     1  package ccerror
     2  
     3  import "fmt"
     4  
     5  // UnknownHTTPSourceError represents HTTP responses with status code >= 400
     6  // that we cannot unmarshal into a {V2,V3}ErrorResponse.
     7  // Ex: In "cf api google.com", google will return a 404, but the body will not match
     8  // an error from the Cloud Controller
     9  type UnknownHTTPSourceError struct {
    10  	StatusCode  int
    11  	RawResponse []byte
    12  }
    13  
    14  func (r UnknownHTTPSourceError) Error() string {
    15  	return fmt.Sprintf("Error unmarshalling the following into a cloud controller error: %s", r.RawResponse)
    16  }