# DurableHttpOptions.DefaultCreateError(Exception)

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

[Source](https://github.com/dotnet/orleans/blob/4e887e9c914a2f2647fb3c81de963511521dd9cb/src/Orleans.Durable.Http/DurableHttpOptions.cs#L93-L95)

```csharp
public static DurableOperationError DefaultCreateError(Exception exception)
```

Describes an exception by the task's outcome alone, without its type or message.

### Parameters

- `exception` (`Exception`): The exception which failed or canceled the task.

### Returns

An error whose code is `Canceled` or `Failed`.
