# DurableHttpOptions Methods

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

## DefaultCreateError(Exception) {#defaultcreateerror-system-exception-d96aba2d}

[Dedicated page](/orleans/docs/api/csharp/microsoft.orleans.durable.http/orleans.durable.http.durablehttpoptions/methods/defaultcreateerror-system-exception-d96aba2d/)

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

## DefaultGetCallerScope(HttpContext) {#defaultgetcallerscope-microsoft-aspnetcore-http-httpcontext-301f5fcc}

[Dedicated page](/orleans/docs/api/csharp/microsoft.orleans.durable.http/orleans.durable.http.durablehttpoptions/methods/defaultgetcallerscope-microsoft-aspnetcore-http-httpcontext-301f5fcc/)

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

```csharp
public static string? DefaultGetCallerScope(HttpContext context)
```

Returns the authenticated user's `System.Security.Claims.ClaimTypes.NameIdentifier` claim, or its `sub` claim, or `null` for a request without either.

### Parameters

- `context` (`HttpContext`): The request.

### Returns

The caller's scope, or `null`.
