Skip to content
This repository has been archived by the owner on Aug 16, 2022. It is now read-only.

Commit

Permalink
fix: Not Supported region added to error classifier (#1006)
Browse files Browse the repository at this point in the history
* fix: Not Supported region added to error classifier

* linter
  • Loading branch information
amanenk authored Jun 7, 2022
1 parent 32d60e6 commit be79739
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions client/errors.go
Original file line number Diff line number Diff line change
Expand Up @@ -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{
Expand Down

0 comments on commit be79739

Please sign in to comment.