# DurableTaskRejectedException Properties

[Type overview](/orleans/docs/api/csharp/microsoft.orleans.durable/orleans.durable.tasks.durabletaskrejectedexception/)

## Code {#code-53da368e}

[Dedicated page](/orleans/docs/api/csharp/microsoft.orleans.durable/orleans.durable.tasks.durabletaskrejectedexception/properties/code-53da368e/)

[Source](https://github.com/dotnet/orleans/blob/6a0e937f544c35ffcf11b37e4c2b7de5a1580a03/src/Orleans.Durable/DurableTasks/DurableTaskRejectedException.cs)

```csharp
[Orleans.Id(2)]
public string? Code
```

Gets the rejection code which the grain reported, or `null` for none.

## Target {#target-fc507dae}

[Dedicated page](/orleans/docs/api/csharp/microsoft.orleans.durable/orleans.durable.tasks.durabletaskrejectedexception/properties/target-fc507dae/)

[Source](https://github.com/dotnet/orleans/blob/6a0e937f544c35ffcf11b37e4c2b7de5a1580a03/src/Orleans.Durable/DurableTasks/DurableTaskRejectedException.cs)

```csharp
[Orleans.Id(1)]
public GrainId Target
```

Gets the grain which rejected the invocation.

## TaskId {#taskid-c731be4d}

[Dedicated page](/orleans/docs/api/csharp/microsoft.orleans.durable/orleans.durable.tasks.durabletaskrejectedexception/properties/taskid-c731be4d/)

[Source](https://github.com/dotnet/orleans/blob/6a0e937f544c35ffcf11b37e4c2b7de5a1580a03/src/Orleans.Durable/DurableTasks/DurableTaskRejectedException.cs)

```csharp
[Orleans.Id(0)]
public TaskId TaskId
```

Gets the task which the invocation starts.
