github.com/mponton/terratest@v0.44.0/modules/http-helper/errors.go (about)

     1  package http_helper
     2  
     3  import "fmt"
     4  
     5  // ValidationFunctionFailed is an error that occurs if a validation function fails.
     6  type ValidationFunctionFailed struct {
     7  	Url    string
     8  	Status int
     9  	Body   string
    10  }
    11  
    12  func (err ValidationFunctionFailed) Error() string {
    13  	return fmt.Sprintf("Validation failed for URL %s. Response status: %d. Response body:\n%s", err.Url, err.Status, err.Body)
    14  }