Skip to content

Why is ThrottlingException not caught and retried by Connection._make_api_call:? #1146

@ilanjb

Description

@ilanjb

I'm using TransactWire to make batch updates
I'm getting this traceback

  File "/python3.7/site-packages/pynamodb/transactions.py", line 31, in __exit__
    self._commit()
  File "/python3.7/site-packages/pynamodb/transactions.py", line 132, in _commit
    return_item_collection_metrics=self._return_item_collection_metrics,
  File "/python3.7/site-packages/pynamodb/connection/base.py", line 1121, in transact_write_items
    raise TransactWriteError("Failed to write transaction items", e)
pynamodb.exceptions.TransactWriteError: Failed to write transaction items

I see that this is intentionally not retried
pynamodb.connection.base.Connection._make_api_call:
except (ValueError, botocore.exceptions.HTTPClientError, botocore.exceptions.ConnectionError) as e:
It seems that ThrottlingException should be retried. It is retried by default in boto3

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions