Skip to content

StreamProviderError

Namespace: Vercel.AI.Prompt

public sealed class StreamProviderError : Exception, ISerializable

A normalized stream provider error. Maps to StreamProviderError.

Inheritance: object → Exception

Implements: ISerializable

View source

StreamProviderError(string, string?, object?, int?, bool, object?)

Section titled “StreamProviderError(string, string?, object?, int?, bool, object?)”
public StreamProviderError(string message, string? type, object? code, int? statusCode, bool isRetryable, object? data)

Creates the error.

Parameters

Name Type Description
message string
type string
code object
statusCode int?
isRetryable bool
data object

View source

public object? Code { get; }

Provider code.

Value: object

View source

public object? Data { get; }

Original payload.

Value: object

View source

public bool IsRetryable { get; }

Whether the caller should retry.

Value: bool

View source

public int? StatusCode { get; }

HTTP status.

Value: int?

View source

public string? Type { get; }

Provider type.

Value: string

View source

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