Skip to content

Cloudformation - DescribeStacksErrorKind only contains "Unhandled" #678

Open
@scottgerring

Description

@scottgerring

Describe the bug

The DescribeStacksErrorKind only contains the value "Unhandled", and it is necessary to match against the error string to decide how to respond to an error. For instance, a quick way to check if a stack exists is to use this call to list, filtering for the given stack name, and then checking that the error returned indicates the stack doesn't exist.

Expected Behavior

The known responses to be parsed out and exposed as different kinds to avoid the caller having to do this themselves (like the other APIs?)

Current Behavior

Code like this:

return if e.to_string().contains("does not exist") {
                Ok(false)
            } else {
                // This is less great
               ...
            }

Reproduction Steps

call DescribeStacks and try and parse the response

Possible Solution

Parse the response out to the different types within the SDK

Additional Information/Context

No response

Version

0.21.0

Environment details (OS name and version, etc.)

osx 12.5.1

Logs

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugThis issue is a bug.cloudformationp3This is a minor priority issueservice-apiThis issue is due to a problem in a service API, not the SDK implementation.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions