# 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/b7a9e3e1c9c54b3cec3a467c5734bf7744541bcf/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?`)
