# CosmosConditionNotSatisfiedException.CosmosConditionNotSatisfiedException(string, 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/b7a9e3e1c9c54b3cec3a467c5734bf7744541bcf/src/Azure/Orleans.Persistence.Cosmos/CosmosConditionNotSatisfiedException.cs#L25-L30)

```csharp
public CosmosConditionNotSatisfiedException(string errorMsg, 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

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