Open
Description
Describe the feature
IMDS client should return SdkServiceException when an http request is returned from the service. It's use of SdkClientException doesn't match the description in the docs: https://docs.aws.amazon.com/sdk-for-java/latest/developer-guide/handling-exceptions.html#sdkclientexception, to wit:
An SdkClientException is generally more severe than an SdkServiceException, and indicates a major problem that is preventing the client from making service calls to AWS services
A request that recieves a response cannot be a client exception. It made the call, the service rejected it.
Use Case
IMDS client returns SdkClientExceptions unconditionally on 4XX errors (
Proposed Solution
Return an SdkServiceException any time there is an actual service response.
Other Information
No response
Acknowledgements
- I may be able to implement this feature request
- This feature might incur a breaking change
AWS Java SDK version used
2
JDK version used
17
Operating System and version
linux 6.11 (nixos)