# IInboxHandlerContext Methods

[Type overview](/orleans/docs/api/csharp/microsoft.orleans.durable/orleans.durable.messaging.iinboxhandlercontext/)

## Complete {#complete-e61d3f08}

[Dedicated page](/orleans/docs/api/csharp/microsoft.orleans.durable/orleans.durable.messaging.iinboxhandlercontext/methods/complete-e61d3f08/)

```csharp
public abstract void Complete()
```

Synchronously stages inbox completion and transport deduplication for the active attempt.

### Exceptions

- `System.InvalidOperationException`: The context is retired or belongs to another activation or handler attempt.

## Fail(string) {#fail-string-de115a9a}

[Dedicated page](/orleans/docs/api/csharp/microsoft.orleans.durable/orleans.durable.messaging.iinboxhandlercontext/methods/fail-string-de115a9a/)

```csharp
public abstract void Fail(string reason)
```

Synchronously stages a permanent processing failure, retaining the message as a dead letter and recording its identity for transport deduplication.

### Parameters

- `reason` (`string`): The nonblank diagnostic reason for the permanent failure.

### Exceptions

- `System.ArgumentException`: The reason is blank.
- `System.ArgumentNullException`: The reason is null.
- `System.InvalidOperationException`: The context is retired or belongs to another activation or attempt, or a different terminal outcome has already been staged.
