github.com/nathanielks/terraform@v0.6.1-0.20170509030759-13e1a62319dc/builtin/providers/pagerduty/errors.go (about) 1 package pagerduty 2 3 import "strings" 4 5 func isNotFound(err error) bool { 6 if strings.Contains(err.Error(), "Failed call API endpoint. HTTP response code: 404") { 7 return true 8 } 9 10 return false 11 } 12 13 func isUnauthorized(err error) bool { 14 return strings.Contains(err.Error(), "HTTP response code: 401") 15 }