Skip to content

FetchErrors

Namespace: Vercel.AI.ProviderUtils

public static class FetchErrors

Turns transport failures into retryable ApiCallErrors. Maps to handleFetchError.

Inheritance: object

View source

HandleFetchError(Exception, string, object)

Section titled “HandleFetchError(Exception, string, object)”
public static Exception HandleFetchError(Exception error, string url, object requestBodyValues)

Returns abort errors unchanged. An HttpRequestException with an inner cause, or any error caused by a connection-level SocketException, becomes a retryable ApiCallError. Other errors are returned unchanged.

Parameters

Name Type Description
error Exception
url string
requestBodyValues object

Returns: Exception

View source

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