# CosmosConditionNotSatisfiedException.CosmosConditionNotSatisfiedException(string, GrainId, string, string, string)

[Type overview](/orleans/docs/api/csharp/microsoft.orleans.persistence.cosmos/orleans.persistence.cosmos.cosmosconditionnotsatisfiedexception/) | [Constructors](/orleans/docs/api/csharp/microsoft.orleans.persistence.cosmos/orleans.persistence.cosmos.cosmosconditionnotsatisfiedexception/constructors/)

[Source](https://github.com/dotnet/orleans/blob/e4e752cedecc2976811db49802c7a999b1f1c704/src/Azure/Orleans.Persistence.Cosmos/CosmosConditionNotSatisfiedException.cs#L41-L43)

```csharp
public CosmosConditionNotSatisfiedException(string grainType, GrainId grainId, string collection, string storedEtag, string currentEtag)
```

Exception thrown when a Cosmos DB exception is thrown due to update conditions not being satisfied.

### Parameters

- `grainType` (`string`)
- `grainId` (`GrainId`)
- `collection` (`string`)
- `storedEtag` (`string`)
- `currentEtag` (`string`)
