aboutsummaryrefslogtreecommitdiff
path: root/cloud/aws/error.go
diff options
context:
space:
mode:
authorMike Crute <mike@crute.us>2021-11-16 14:46:24 -0800
committerMike Crute <mike@crute.us>2021-11-17 07:56:10 -0800
commitcc58a3da7d647de8520e33dc4356672d2ed1a366 (patch)
tree1b232a0d51446eb6370cfb13932190d31ce053df /cloud/aws/error.go
parenta42d794a286154a3106551e6e483861af2a9ef16 (diff)
downloadcloud-identity-broker-cc58a3da7d647de8520e33dc4356672d2ed1a366.tar.bz2
cloud-identity-broker-cc58a3da7d647de8520e33dc4356672d2ed1a366.tar.xz
cloud-identity-broker-cc58a3da7d647de8520e33dc4356672d2ed1a366.zip
Import of source code
Diffstat (limited to 'cloud/aws/error.go')
-rw-r--r--cloud/aws/error.go11
1 files changed, 11 insertions, 0 deletions
diff --git a/cloud/aws/error.go b/cloud/aws/error.go
new file mode 100644
index 0000000..62fda48
--- /dev/null
+++ b/cloud/aws/error.go
@@ -0,0 +1,11 @@
1package aws
2
3import (
4 "strings"
5)
6
7// IsRegionNotExist tries to determine if the error is caused by a region not
8// existing, as would be the case in a user typo.
9func IsRegionNotExist(err error) bool {
10 return strings.Contains(err.Error(), "no such host")
11}