github.com/danp/terraform@v0.9.5-0.20170426144147-39d740081351/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  }