# CosmosConditionNotSatisfiedException Constructors

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

## CosmosConditionNotSatisfiedException {#constructor-a533f52f}

[Dedicated page](/orleans/docs/api/csharp/microsoft.orleans.persistence.cosmos/orleans.persistence.cosmos.cosmosconditionnotsatisfiedexception/constructors/constructor-a533f52f/)

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

```csharp
public CosmosConditionNotSatisfiedException()
```

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

## CosmosConditionNotSatisfiedException(string, string, GrainId, string, string, string) {#constructor-string-string-orleans-runtime-grainid-string-string-string-bee0440e}

[Dedicated page](/orleans/docs/api/csharp/microsoft.orleans.persistence.cosmos/orleans.persistence.cosmos.cosmosconditionnotsatisfiedexception/constructors/constructor-string-string-orleans-runtime-grainid-string-string-string-bee0440e/)

[Source](https://github.com/dotnet/orleans/blob/e4e752cedecc2976811db49802c7a999b1f1c704/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`)

## CosmosConditionNotSatisfiedException(string, GrainId, string, string, string) {#constructor-string-orleans-runtime-grainid-string-string-string-d77cc95e}

[Dedicated page](/orleans/docs/api/csharp/microsoft.orleans.persistence.cosmos/orleans.persistence.cosmos.cosmosconditionnotsatisfiedexception/constructors/constructor-string-orleans-runtime-grainid-string-string-string-d77cc95e/)

[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`)

## CosmosConditionNotSatisfiedException(string) {#constructor-string-6fdec19b}

[Dedicated page](/orleans/docs/api/csharp/microsoft.orleans.persistence.cosmos/orleans.persistence.cosmos.cosmosconditionnotsatisfiedexception/constructors/constructor-string-6fdec19b/)

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

```csharp
public CosmosConditionNotSatisfiedException(string msg)
```

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

### Parameters

- `msg` (`string`)

## CosmosConditionNotSatisfiedException(string, Exception) {#constructor-string-system-exception-b20de626}

[Dedicated page](/orleans/docs/api/csharp/microsoft.orleans.persistence.cosmos/orleans.persistence.cosmos.cosmosconditionnotsatisfiedexception/constructors/constructor-string-system-exception-b20de626/)

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

```csharp
public CosmosConditionNotSatisfiedException(string msg, Exception exc)
```

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

### Parameters

- `msg` (`string`)
- `exc` (`Exception`)
