aws-sdk-go-v2 icon indicating copy to clipboard operation
aws-sdk-go-v2 copied to clipboard

context cancellation semantics, errors, etc..., are incomplete

Open necro351 opened this issue 4 years ago • 3 comments

Describe the issue with documentation The documentation does not describe how to use contexts with the API. When an API call is interrupted because the caller cancels the context the documentation does not describe which error is returned. The documentation does not describe whether the error is only returned IFF the context which was passed in returns non-nil if you call its Err() method.

To Reproduce (observed behavior) Google search context canceled error with golang sdk v2 and read through sdk's docs and find no information on the topic.

Expected behavior Should find example code showing how to check if an API call failed because its context was canceled. Should find clear rules about the relationship between the ctx which was passed in and the error returned by the API, e.g., ctx.Err() != nil IFF the API returns an error that wraps smithy.CanceledError.

Screenshots If applicable, add screenshots to help explain your problem.

Additional context Add any other context about the problem here.

necro351 avatar May 22 '21 22:05 necro351

Hmmm yea I think this is a reasonable ask, we'll look into adding to our documentation.

KaibaLopez avatar Jul 15 '21 21:07 KaibaLopez

We have noticed this issue has not received attention in 1 year. We will close this issue for now. If you think this is in error, please feel free to comment and reopen the issue.

github-actions[bot] avatar Jul 16 '22 00:07 github-actions[bot]

I think this is still a problem. Is it possible to address it please?

yerke avatar Jul 19 '22 04:07 yerke

Hi there,

We have a section in our developer guide about timeouts and context. https://aws.github.io/aws-sdk-go-v2/docs/configuring-sdk/retries-timeouts/#timeouts

Since context is a general and broad Golang concept and not SDK specific Im going to close this issue.

Thanks, Ran~

RanVaknin avatar May 02 '24 20:05 RanVaknin

This issue is now closed. Comments on closed issues are hard for our team to see. If you need more assistance, please open a new issue that references this one.

github-actions[bot] avatar May 02 '24 20:05 github-actions[bot]