github.com/vtorhonen/terraform@v0.9.0-beta2.0.20170307220345-5d894e4ffda7/builtin/providers/opsgenie/util.go (about)

     1  package opsgenie
     2  
     3  import (
     4  	"fmt"
     5  	"net/http"
     6  )
     7  
     8  func checkOpsGenieResponse(code int, status string) error {
     9  	if code == http.StatusOK {
    10  		return nil
    11  	}
    12  
    13  	return fmt.Errorf("Unexpected Status Code '%d', Response '%s'", code, status)
    14  }