# TraconTenantQuotaExceededException

> Tracon documentation. Tracon is a .NET package family that adds a control
> plane on Microsoft Agent Framework, published as NuGet packages that run
> inside your own ASP.NET Core application.
>
> Page: https://tracon.dev/api/tracon.tracontenantquotaexceededexception/
> Summary: TraconTenantQuotaExceededException: Thrown when a tenant's quota period is spent and a run tree that is already running is refused new work: a workflow function node or an agent step that has not.

<div class="api-provenance">Namespace Tracon · Assembly <code>Tracon.Abstractions.dll</code></div>

Thrown when a tenant's quota period is spent and a run tree that is already running is
refused new work: a workflow function node or an agent step that has not started.

```csharp
public sealed class TraconTenantQuotaExceededException : TraconException, ISerializable
```

<dl class="api-relations"><dt>Inheritance</dt><dd><a href="https://learn.microsoft.com/dotnet/api/system.object">object</a> ← <a href="https://learn.microsoft.com/dotnet/api/system.exception">Exception</a> ← <a href="/api/tracon.traconexception/">TraconException</a> ← <a href="/api/tracon.tracontenantquotaexceededexception/">TraconTenantQuotaExceededException</a></dd><dt>Implements</dt><dd><a href="https://learn.microsoft.com/dotnet/api/system.runtime.serialization.iserializable">ISerializable</a></dd><dt>Inherited Members</dt><dd><a href="/api/tracon.traconexception/#Tracon_TraconException_ErrorType">TraconException.ErrorType</a>, <a href="https://learn.microsoft.com/dotnet/api/system.exception.getbaseexception">Exception.GetBaseException()</a>, <a href="https://learn.microsoft.com/dotnet/api/system.exception.tostring">Exception.ToString()</a>, <a href="https://learn.microsoft.com/dotnet/api/system.exception.gettype">Exception.GetType()</a>, <a href="https://learn.microsoft.com/dotnet/api/system.exception.targetsite">Exception.TargetSite</a>, <a href="https://learn.microsoft.com/dotnet/api/system.exception.message">Exception.Message</a>, <a href="https://learn.microsoft.com/dotnet/api/system.exception.data">Exception.Data</a>, <a href="https://learn.microsoft.com/dotnet/api/system.exception.innerexception">Exception.InnerException</a>, <a href="https://learn.microsoft.com/dotnet/api/system.exception.helplink">Exception.HelpLink</a>, <a href="https://learn.microsoft.com/dotnet/api/system.exception.source">Exception.Source</a>, <a href="https://learn.microsoft.com/dotnet/api/system.exception.hresult">Exception.HResult</a>, <a href="https://learn.microsoft.com/dotnet/api/system.exception.stacktrace">Exception.StackTrace</a>, <a href="https://learn.microsoft.com/dotnet/api/system.object.gettype">object.GetType()</a>, <a href="https://learn.microsoft.com/dotnet/api/system.object.tostring">object.ToString()</a>, <a href="https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object)">object.Equals(object?)</a>, <a href="https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object-system-object)">object.Equals(object?, object?)</a>, <a href="https://learn.microsoft.com/dotnet/api/system.object.referenceequals">object.ReferenceEquals(object?, object?)</a>, <a href="https://learn.microsoft.com/dotnet/api/system.object.gethashcode">object.GetHashCode()</a></dd></dl>

## Remarks

The quota is read where the work begins, not only where the request comes in
(`429`). A workflow that runs for hours would otherwise pass a quota that was spent
in its first minutes. Only a start is refused: a node or a model call already in progress
is never cut off, so a tenant can pass its limit by as much as the work that was running
when the limit was reached.

This is a different fault from [TraconRunBudgetExceededException](/api/tracon.traconrunbudgetexceededexception/), and the
remedy differs. A run tree's budget is a setting of the installation (`Tracon:AgentGraph`);
a tenant's quota resets when its period ends. Both end the run [RunStatus.Failed](/api/tracon.runstatus/)
in the class [RunErrorClass.QuotaExceeded](/api/tracon.runerrorclass/), and neither is retried by a workflow
node's retry policy.

The exception is not thrown to an agent that called a sub-agent: there the refusal comes back
to the model as a tool result, as a spent run tree budget does.

## Constructors

### <a id="Tracon_TraconTenantQuotaExceededException__ctor"></a> TraconTenantQuotaExceededException\(\)

Creates a new error.

```csharp
public TraconTenantQuotaExceededException()
```

### <a id="Tracon_TraconTenantQuotaExceededException__ctor_System_String_"></a> TraconTenantQuotaExceededException\(string\)

Creates a new error.

```csharp
public TraconTenantQuotaExceededException(string message)
```

#### Parameters

`message` [string](https://learn.microsoft.com/dotnet/api/system.string)

The error message.

### <a id="Tracon_TraconTenantQuotaExceededException__ctor_System_String_System_Exception_"></a> TraconTenantQuotaExceededException\(string, Exception\)

Creates a new error.

```csharp
public TraconTenantQuotaExceededException(string message, Exception innerException)
```

#### Parameters

`message` [string](https://learn.microsoft.com/dotnet/api/system.string)

The error message.

`innerException` [Exception](https://learn.microsoft.com/dotnet/api/system.exception)

The underlying error.

## Fields

### <a id="Tracon_TraconTenantQuotaExceededException_TenantQuotaExceededErrorType"></a> TenantQuotaExceededErrorType

The stable value written to [TraconException.ErrorType](/api/tracon.traconexception/#Tracon_TraconException_ErrorType).

```csharp
public const string TenantQuotaExceededErrorType = "tenant_quota_exceeded"
```

#### Field Value

 [string](https://learn.microsoft.com/dotnet/api/system.string)

## Properties

### <a id="Tracon_TraconTenantQuotaExceededException_ErrorType"></a> ErrorType

Gets the stable error type name written to the run record.

```csharp
public override string ErrorType { get; }
```

#### Property Value

 [string](https://learn.microsoft.com/dotnet/api/system.string)

#### Remarks

Defaults to the full name of the exception type, so today's behaviour does
not change. A derived type overrides this member when the record has to be
machine readable — for example [TraconContentFilteredException](/api/tracon.traconcontentfilteredexception/)
writes `content_filtered`. Reports and alert rules can rely on this
stable name instead of an assembly name.

The value is written to `RunError.Type` and **carries no secret**.

### <a id="Tracon_TraconTenantQuotaExceededException_Limit"></a> Limit

Gets the limit that was reached, or [null](https://learn.microsoft.com/dotnet/csharp/language-reference/keywords/null) when the quota could not be verified.

```csharp
public decimal? Limit { get; init; }
```

#### Property Value

 [decimal](https://learn.microsoft.com/dotnet/api/system.decimal)?

### <a id="Tracon_TraconTenantQuotaExceededException_Metric"></a> Metric

Gets the metric whose limit was reached, or [null](https://learn.microsoft.com/dotnet/csharp/language-reference/keywords/null) when the quota could not be verified.

```csharp
public QuotaMetric? Metric { get; init; }
```

#### Property Value

 [QuotaMetric](/api/tracon.quotametric/)?

### <a id="Tracon_TraconTenantQuotaExceededException_Period"></a> Period

Gets the period whose limit was reached, or [null](https://learn.microsoft.com/dotnet/csharp/language-reference/keywords/null) when the quota could not be verified.

```csharp
public QuotaPeriod? Period { get; init; }
```

#### Property Value

 [QuotaPeriod](/api/tracon.quotaperiod/)?
