Skip to content

RetryError

Namespace: Vercel.AI.Util

public sealed class RetryError : AiSdkError, ISerializable, IErrorMarkers

Retries were exhausted or stopped.

Inheritance: object → Exception → AiSdkError

Implements: ISerializable, IErrorMarkers

View source

RetryError(string, RetryErrorReason, IReadOnlyList<object>)

Section titled “RetryError(string, RetryErrorReason, IReadOnlyList<object>)”
public RetryError(string message, RetryErrorReason reason, IReadOnlyList<object> errors)

Creates the error.

Parameters

Name Type Description
message string
reason RetryErrorReason
errors IReadOnlyList<object>

View source

public const string ErrorMarker = "vercel.ai.error.AI_RetryError"

Marker for IsInstance(object).

Value: string

View source

public IReadOnlyList<object> Errors { get; }

Errors from each attempt, in order.

Value: IReadOnlyList<object>

View source

public object? LastError { get; }

Last attempt’s error.

Value: object

View source

public RetryErrorReason Reason { get; }

Why retrying stopped.

Value: RetryErrorReason

View source

public static bool IsInstance(object? error)

Returns whether <code class=“paramref”>error</code> carries this error’s marker.

Parameters

Name Type Description
error object

Returns: bool

View source

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