diff options
Diffstat (limited to 'cloud/aws/error.go')
-rw-r--r-- | cloud/aws/error.go | 11 |
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 @@ | |||
1 | package aws | ||
2 | |||
3 | import ( | ||
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. | ||
9 | func IsRegionNotExist(err error) bool { | ||
10 | return strings.Contains(err.Error(), "no such host") | ||
11 | } | ||