github.com/recobe182/terraform@v0.8.5-0.20170117231232-49ab22a935b7/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  }