Skip to content

GatewayRateLimitError

Namespace: Vercel.AI.Gateway

public sealed class GatewayRateLimitError : GatewayError, ISerializable

A Gateway rate limit.

Inheritance: object → Exception → AiSdkException → GatewayError

Implements: ISerializable

View source

GatewayRateLimitError(string?, int, Exception?, string?)

Section titled “GatewayRateLimitError(string?, int, Exception?, string?)”
public GatewayRateLimitError(string? message = null, int statusCode = 429, Exception? cause = null, string? generationId = null)

Creates a rate-limit error.

Parameters

Name Type Description
message string
statusCode int
cause Exception
generationId string

View source

public override string Type { get; }

Gateway error type.

Value: string

View source

public static bool IsInstance(Exception? error)

True when <code class=“paramref”>error</code> is this error.

Parameters

Name Type Description
error Exception

Returns: bool

View source

Apache-2.0 · Copyright 2023 Vercel, Inc. · unofficial community port, not an official Vercel product