Skip to content

get-rest-api not returning "NotFoundException" for empty RestApi Id #2534

@ghost

Description

I discovered this with one of the SDKs so it's not necessarily a CLI issue and likely more of an API one, but I was able to reproduce the potential issue with the client as well.

Calling get-rest-api with a valid RestApi Id returns RestApi output as expected, and an invalid one like aws apigateway get-rest-api --rest-api-id blah generates an exception:

An error occurred (NotFoundException) when calling the GetRestApi operation: Invalid REST API identifier specified

However aws apigateway get-rest-api --rest-api-id "" returns nothing--neither an error nor an exception. With both the CLI and SDKs the output is empty. (Less of a concern at the command line than when checking programmatically and expecting either api info or an error/exception.)

Reporting here with the idea that the right parties can be advised.

Metadata

Metadata

Assignees

No one assigned

    Labels

    guidanceQuestion that needs advice or information.service-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