Skip to content

GatewayTimeoutError

Namespace: Vercel.AI.Gateway

public sealed class GatewayTimeoutError : GatewayError, ISerializable

The client timed out before the Gateway responded.

Inheritance: object → Exception → AiSdkException → GatewayError

Implements: ISerializable

View source

GatewayTimeoutError(string?, int, Exception?, string?)

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

Creates a timeout 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 GatewayTimeoutError Create(string originalMessage, Exception? cause = null, int statusCode = 408, string? generationId = null)

Wraps a client timeout with the Gateway troubleshooting text.

Parameters

Name Type Description
originalMessage string
cause Exception
statusCode int
generationId string

Returns: GatewayTimeoutError

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