aws-sdk-cpp icon indicating copy to clipboard operation
aws-sdk-cpp copied to clipboard

UnauthorizedOperation is not supported yet in error handling

Open Flow86 opened this issue 2 years ago • 0 comments

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

Flow86 avatar Jun 24 '22 11:06 Flow86