github.com/loggregator/cli@v6.33.1-0.20180224010324-82334f081791+incompatible/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  }