mirror of
https://github.com/opentofu/opentofu.git
synced 2025-02-20 11:48:24 -06:00
* Validate credentials * Add ability to skip validation * Update provider documentation * invalidCredentials -> invalidCreds * Include original error message * Update description for skip_credentials_validation * Add config test * set skip_credentials_validation default to false
16 lines
300 B
Go
16 lines
300 B
Go
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
|
|
}
|
|
|
|
func isUnauthorized(err error) bool {
|
|
return strings.Contains(err.Error(), "HTTP response code: 401")
|
|
}
|