Skip to content
This repository has been archived by the owner on Nov 5, 2024. It is now read-only.

No ThrottlingException class in ECS client #821

Closed
himat opened this issue Sep 22, 2024 · 7 comments
Closed

No ThrottlingException class in ECS client #821

himat opened this issue Sep 22, 2024 · 7 comments
Assignees
Labels
ecs feature-request New feature or request service-api This issue pertains to the AWS API

Comments

@himat
Copy link

himat commented Sep 22, 2024

The ECS client does not expose ThrottlingException for some reason.

@khushail khushail self-assigned this Sep 23, 2024
@khushail khushail added service-api This issue pertains to the AWS API feature-request New feature or request investigating labels Sep 24, 2024
@khushail
Copy link

Hi @himat , thanks for reaching out.

I see that ThrottlingException error code is being mentioned in ECS Client API Docs. You could use that in your API Call.

Sharing some other references -
https://docs.aws.amazon.com/AmazonECS/latest/developerguide/operating-at-scale-dealing-with-throttles.html
https://docs.aws.amazon.com/AmazonECS/latest/APIReference/request-throttling.html#throttling-how

It would really be helpful if you could please share information stated below -

  1. Your usecase for exposure of this class
  2. Are you looking for any particular language SDK usage here

Thanks.

@khushail khushail added response-requested This issue requires a response to continue and removed service-api This issue pertains to the AWS API labels Sep 24, 2024
@himat
Copy link
Author

himat commented Sep 25, 2024

  1. Usecase is to match on this error class using instanceof instead of checking error.name === "ThrottlingException"
  2. For typescript/javascript SDK

@github-actions github-actions bot removed the response-requested This issue requires a response to continue label Sep 25, 2024
@khushail
Copy link

Thanks for replying @himat . Looks like this is meant to be with JS Team. Reaching out to JS on call for further action

@khushail khushail removed their assignment Sep 25, 2024
@RanVaknin
Copy link

RanVaknin commented Sep 25, 2024

Hi @himat ,

The reason the SDK does not have a concrete type for ThrottlingException is because the ECS service team never defined it in their API model. You can cmd + f to search in this API model to see that it doesn't exist. This API model is the source file that the SDKs are generated from, and is defined upstream by the service team (cannot be edited directly).

We can open a feature request with the service team to add this to their model as a modeled exception, for the sake of transparency I'd say that this would likely be classified as a lower priority issue and might not be implemented any time soon.

Since you are using the JS SDK, you can safely use error.name even if a concrete type of an error has not been defined as the error is unlikely to change.

Thanks,
Ran~

V1528678655

@RanVaknin RanVaknin added service-api This issue pertains to the AWS API and removed investigating labels Sep 25, 2024
@zshzbh zshzbh transferred this issue from aws/aws-sdk Sep 25, 2024
@zshzbh zshzbh transferred this issue from aws/aws-sdk-js-v3 Sep 25, 2024
@RanVaknin RanVaknin added the ecs label Sep 25, 2024
@RanVaknin RanVaknin self-assigned this Sep 25, 2024
@RanVaknin
Copy link

RanVaknin commented Oct 30, 2024

Hi @himat ,

I received word from the ECS team that they do not return any ThrottlingException from the server therefore they dont expose this error in their model.

Thanks,
Ran~

@RanVaknin RanVaknin closed this as not planned Won't fix, can't repro, duplicate, stale Oct 30, 2024
Copy link

This issue is now closed.

Comments on closed issues are hard for our team to see.
If you need more assistance, please either tag a team member or open a new issue that references this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.

@himat
Copy link
Author

himat commented Oct 31, 2024

@RanVaknin uh... ok but the ECS API literally does return throttling errors, I have run into it many times. I don't know why they don't return an explicit ThrottlingException but it does get throttled

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
ecs feature-request New feature or request service-api This issue pertains to the AWS API
Projects
None yet
Development

No branches or pull requests

3 participants