2016-12-24 15:43:06 +01:00
|
|
|
package pagerduty
|
|
|
|
|
|
|
|
import "strings"
|
|
|
|
|
|
|
|
func isNotFound(err error) bool {
|
|
|
|
if strings.Contains(err.Error(), "Failed call API endpoint. HTTP response code: 404") {
|
|
|
|
return true
|
|
|
|
}
|
|
|
|
|
|
|
|
return false
|
|
|
|
}
|
2017-03-19 18:37:46 +01:00
|
|
|
|
|
|
|
func isUnauthorized(err error) bool {
|
|
|
|
return strings.Contains(err.Error(), "HTTP response code: 401")
|
|
|
|
}
|