Skip to content

[BUG] TableClient SubmitTransactionAsync throws InvalidOperationExteption on empty arguments #48746

Open
@thomaseyde

Description

@thomaseyde

Library name and version

Azure.Data.Tables 12.9.1

Describe the bug

Call to table.ClientSubmitTransactionAsync(actions) throws an InvalidOperationException when actions is an empty collection.

There is nothing in the code documentation (tooltip in IDE) which hints that an empty collection is an exceptional case.

This behaviour is unfortunate, because one usually discover this in production logs or during debugging and the exceptions does not add value.

Expected behavior

Passing an empty collection to table.ClientSubmitTransactionAsync(actions) should be treated as a no-op so we do not have to add defensive code for something non-obvious.

Actual behavior

Call to table.ClientSubmitTransactionAsync(actions) throws an InvalidOperationException when actions is an empty collection.

Reproduction Steps

 await tableClient.SubmitTransactionAsync([]);

Environment

No response

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

ClientThis issue points to a problem in the data-plane of the library.Tablescustomer-reportedIssues that are reported by GitHub users external to the Azure organization.issue-addressedWorkflow: The Azure SDK team believes it to be addressed and ready to close.questionThe issue doesn't require a change to the product in order to be resolved. Most issues start as that

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions