# ScheduledTask.Exception

[Type overview](/orleans/docs/api/csharp/microsoft.orleans.durable.abstractions/orleans.durable.tasks.scheduledtask/) | [Properties](/orleans/docs/api/csharp/microsoft.orleans.durable.abstractions/orleans.durable.tasks.scheduledtask/properties/)

[Source](https://github.com/dotnet/orleans/blob/6a0e937f544c35ffcf11b37e4c2b7de5a1580a03/src/Orleans.Durable.Abstractions/ScheduledTask.cs#L70)

```csharp
public Exception? Exception
```

Gets the recorded failure or cancellation of a task which failed or was canceled, once this handle has observed its terminal response; otherwise `null`.
