Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

When cancelled, dynamodb.eu-west-1.amazonaws.com throws an exception instead of returning HTTP code #3355

Closed
AleksandrsJakovlevsVisma opened this issue Jun 26, 2024 · 2 comments
Labels
bug This issue is a bug. dynamodb needs-reproduction This issue needs reproduction. p2 This is a standard priority issue

Comments

@AleksandrsJakovlevsVisma

Describe the bug

dynamodb.eu-west-1.amazonaws.com exits gracefully when for example one tries to update an entity that doesn't exist (it returns 400), however, if the request has been canceled, the server throws TaskCanceledException

Expected Behavior

dynamodb.eu-west-1.amazonaws.com should return some HTTP error code (400, for example) when the request is canceled.

Current Behavior

It throws TaskCanceledException exception

Reproduction Steps

  1. Issue a POST request with a cancellation token
  2. Make sure the cancellation token is canceled before the request finishes processing
  3. Observe the exception

Possible Solution

No response

Additional Information/Context

I have been using AWSSDK.DynamoDBv2 nuget package to call the server. Libraries correctly throw TaskCancelledException when dynamodb request throws that exception, however, I expect the server not to throw that exception. I realize this might not be the place to report this, but I am hoping that if that's indeed a wrong place, someone would point me to the correct one

AWS .NET SDK and/or Package version used

AWSSDK.DynamoDBv2 3.7.301.20

Targeted .NET Platform

.NET 8

Operating System and version

Windows 11

@AleksandrsJakovlevsVisma AleksandrsJakovlevsVisma added bug This issue is a bug. needs-triage This issue or PR still needs to be triaged. labels Jun 26, 2024
@bhoradc bhoradc added service-api This issue is due to a problem in a service API, not the SDK implementation. dynamodb p2 This is a standard priority issue needs-reproduction This issue needs reproduction. and removed needs-triage This issue or PR still needs to be triaged. labels Jun 26, 2024
@ashishdhingra ashishdhingra removed the service-api This issue is due to a problem in a service API, not the SDK implementation. label Jun 28, 2024
@normj
Copy link
Member

normj commented Jun 29, 2024

When the cancellation token is canceled that is all handled on the client side. It could even happen before the request is even sent to the AWS service. The .NET runtime is what generates the TaskCanceledException.

Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This issue is a bug. dynamodb needs-reproduction This issue needs reproduction. p2 This is a standard priority issue
Projects
None yet
Development

No branches or pull requests

5 participants