DuplicateRequest exception for transfer_domain_to_another_aws_account does not return RequestId
See original GitHub issueDescribe the bug A clear and concise description of what the bug is.
When calling boto3.client("route53domains").transfer_domain_to_another_aws_account()
on a domain that has already been prepared for transfer, the following exception is raised:
response = domains_client.transfer_domain_to_another_aws_account(
DomainName="example.com", AccountId="account_id")
Traceback (most recent call last):
File "<ipython-input-22-5de0b5a2322a>", line 1, in <module>
response = domains_client.transfer_domain_to_another_aws_account(
File "/Users/user/opt/anaconda3/envs/manage_domains/lib/python3.9/site-packages/botocore/client.py", line 357, in _api_call
return self._make_api_call(operation_name, kwargs)
File "/Users/user/opt/anaconda3/envs/manage_domains/lib/python3.9/site-packages/botocore/client.py", line 676, in _make_api_call
raise error_class(parsed_response, operation_name)
DuplicateRequest: An error occurred (DuplicateRequest) when calling the TransferDomainToAnotherAwsAccount operation: A request already pending for the operation. Please use the RequestId from the exception to track the request status.
Steps to reproduce If you have a runnable example, please include it as a snippet or link to a repository/gist for larger code examples.
Run twice:
domains_client.transfer_domain_to_another_aws_account(
DomainName=name, AccountId=account)
Expected behavior A clear and concise description of what you expected to happen.
The way I understand the error message, a request ID should be provided, this is not the case.
Debug logs
Full stack trace by adding boto3.set_stream_logger('')
to your code.
2021-05-01 13:42:09,130 botocore.parsers [DEBUG] Response headers: {'x-amzn-RequestId': 'request_id', 'Content-Type': 'application/x-amz-json-1.1', 'Content-Length': '159', 'Date': 'Sat, 01 May 2021 11:42:09 GMT', 'Connection': 'close'}
2021-05-01 13:42:09,131 botocore.parsers [DEBUG] Response body:
b'{"__type":"DuplicateRequest","message":"A request already pending for the operation. Please use the RequestId from the exception to track the request status."}'
2021-05-01 13:42:09,131 botocore.parsers [DEBUG] Response headers: {'x-amzn-RequestId': 'request_id', 'Content-Type': 'application/x-amz-json-1.1', 'Content-Length': '159', 'Date': 'Sat, 01 May 2021 11:42:09 GMT', 'Connection': 'close'}
2021-05-01 13:42:09,132 botocore.parsers [DEBUG] Response body:
b'{"__type":"DuplicateRequest","message":"A request already pending for the operation. Please use the RequestId from the exception to track the request status."}'
2021-05-01 13:42:09,133 botocore.hooks [DEBUG] Event needs-retry.route-53-domains.TransferDomainToAnotherAwsAccount: calling handler <botocore.retryhandler.RetryHandler object at 0x7fbee867fca0>
2021-05-01 13:42:09,134 botocore.retryhandler [DEBUG] No retry needed.
Traceback (most recent call last):
File "<ipython-input-9-31d856c3bb09>", line 1, in <module>
domains_client.transfer_domain_to_another_aws_account(
File "/opt/anaconda3/envs/manage_domains/lib/python3.9/site-packages/botocore/client.py", line 357, in _api_call
return self._make_api_call(operation_name, kwargs)
File "/opt/anaconda3/envs/manage_domains/lib/python3.9/site-packages/botocore/client.py", line 676, in _make_api_call
raise error_class(parsed_response, operation_name)
DuplicateRequest: An error occurred (DuplicateRequest) when calling the TransferDomainToAnotherAwsAccount operation: A request already pending for the operation. Please use the RequestId from the exception to track the request status.
Issue Analytics
- State:
- Created 2 years ago
- Comments:13 (12 by maintainers)
Top Results From Across the Web
TransferDomainToAnotherAwsA...
When you transfer a domain from one AWS account to another, Route 53 doesn't transfer the hosted zone that is associated with the...
Read more >Amazon Route 53 - API Reference
If Amazon Route 53 can't process a request before the next request arrives, it will reject subsequent requests for the same hosted zone...
Read more >Route53Domains — Boto3 Docs 1.26.30 documentation
The identifier that TransferDomainToAnotherAwsAccount returned to track the progress of the request. Because the transfer request was canceled, the value is no ......
Read more >Amazon Route 53 - API Reference - manuals.plus
Amazon Route 53 API Reference Amazon's trademarks and trade dress may not be used in ... The following data is returned in XML...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Was a pleasure! Thanks for investigating this so quickly!
⚠️COMMENT VISIBILITY WARNING⚠️
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.