InvalidArgumentError
Namespace: Vercel.AI.Util
public sealed class InvalidArgumentError : AiSdkError, ISerializable, IErrorMarkersAn argument failed validation. Message format matches the TypeScript SDK.
Inheritance: object → Exception → AiSdkError
Implements: ISerializable, IErrorMarkers
Constructors
Section titled “Constructors”InvalidArgumentError(string, object?, string)
Section titled “InvalidArgumentError(string, object?, string)”public InvalidArgumentError(string parameter, object? value, string message)Creates the error for <code class=“paramref”>parameter</code>.
Parameters
| Name | Type | Description |
|---|---|---|
parameter |
string | |
value |
object | |
message |
string |
Fields
Section titled “Fields”ErrorMarker
Section titled “ErrorMarker”public const string ErrorMarker = "vercel.ai.error.AI_InvalidArgumentError"Marker for IsInstance(object).
Value: string
Properties
Section titled “Properties”Parameter
Section titled “Parameter”public string Parameter { get; }Parameter that failed validation.
Value: string
public object? Value { get; }Rejected value.
Value: object
Methods
Section titled “Methods”IsInstance(object?)
Section titled “IsInstance(object?)”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
Apache-2.0 · Copyright 2023 Vercel, Inc. · unofficial community port, not an official Vercel product