Skip to content

SerializationError

Namespace: Vercel.AI.ProviderUtils

public sealed class SerializationError : AiSdkError, ISerializable, IErrorMarkers

A value could not be serialized. Maps to SerializationError.

Inheritance: object → Exception → AiSdkError

Implements: ISerializable, IErrorMarkers

View source

public SerializationError(string? message = null, Exception? cause = null)

Creates the error.

Parameters

Name Type Description
message string
cause Exception

View source

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

Marker for IsInstance(object).

Value: string

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