# IInboxHandlerContext.Fail(string)

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

```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.
