Skip to content

UnauthorizedOperation is not supported yet in error handling #1972

Open
@Flow86

Description

@Flow86

Describe the bug

If you block a region via AWS Control Tower, any operation (EBS, EC2, RDS) will return UnauthorizedOperation error.
This error can not be handled in a special way. Thats not good, but not a bug yet.
If you try to use GetExceptionName on the error, you get

Unable to parse ExceptionName: UnauthorizedOperation

as a result. And thats wrong.

// ...
const auto error = outcome.GetError();

// if(error.GetErrorType() == Aws::RDS::RDSErrors::UNAUTHORIZED_OPERATION) // -> not possible, since error does not exist
// {}

error.GetExceptionName() // -> returns "Unable to parse ExceptionName: UnauthorizedOperation"

Expected Behavior

UnauthorizedOperation should be handled in all places where it can happen (i.e "core"?)

Current Behavior

see "Describe the bug"

Reproduction Steps

see "Describe the bug"

Possible Solution

see "Describe the bug"

Additional Information/Context

No response

AWS CPP SDK version used

1.9.285

Compiler and Version used

VS2022

Operating System and version

Windows 11

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugThis issue is a bug.needs-reproductionThis issue needs reproduction.p2This is a standard priority issue

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions