-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
botocore 1.9.x doesn't raise ExpiredToken error #1400
Comments
Here is a reproducible test case, which will not raise an error but hang where the authentication use a valid key and secret and invalid token using boto3==1.6.4 and botocore==1.9.4:
But if you run boto3=1.5.36 and botocore==1.8.50, it will raise an error:
Looks like new botocore retries automatically for HTTP 400, but never success. In theory, the error indicates the request is not valid, so it has to change the input and retry. |
I can reproduce this using the above code, my initial guess is that it's related to #1387 somehow. |
Removing Is it possible to check the content of HTTP response to decide whether it is retryable? There are several cases that return 400: https://docs.aws.amazon.com/AmazonS3/latest/API/ErrorResponses.html |
Just to clarify my specific use case is |
Done. |
1.9.18 works for my test cases. Thanks! |
Good to hear! |
This is happening to me with boto3 1.9.47 + botocore 1.12.47 calling download_fileobj with an expired profile.
The call works if I re-auth. reopen with new title? |
s3client.Object's
upload_file
method does no longer raiseExpiredToken
error if the given token expires in botocore 1.9.x. I have this code and catchClientError
such that the upper stream can renew the token. This works fine before 1.9.0:But the new botocore 1.9.0+ returns HTTP 400 but doesn't raise
ExpiredToken
error code.Is there any way to detect the token expiration?
The text was updated successfully, but these errors were encountered: