From be7973907251f089dcc988ae0d094a3e2416a5fe Mon Sep 17 00:00:00 2001 From: Andrii Romanenko Date: Tue, 7 Jun 2022 18:54:55 +0300 Subject: [PATCH] fix: Not Supported region added to error classifier (#1006) * fix: Not Supported region added to error classifier * linter --- client/errors.go | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/client/errors.go b/client/errors.go index b1a84e50e..e027a72e9 100644 --- a/client/errors.go +++ b/client/errors.go @@ -112,6 +112,19 @@ func classifyError(err error, fallbackType diag.Type, accounts []Account, opts . )...), ), } + case "UnsupportedOperation": + if strings.Contains(ae.ErrorMessage(), "The functionality you requested is not available in this region.") { + return diag.Diagnostics{ + RedactError(accounts, diag.NewBaseError(err, + diag.RESOLVING, + append(opts, + diag.WithType(diag.RESOLVING), + diag.WithSeverity(diag.IGNORE), + ParseSummaryMessage(err), + diag.WithDetails("The action is not available in selected region"))...), + ), + } + } } if ae.ErrorMessage() == ssoInvalidOrExpired { return diag.Diagnostics{