-
Notifications
You must be signed in to change notification settings - Fork 4.5k
get-rest-api not returning "NotFoundException" for empty RestApi Id #2534
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.