Skip to content

ErrorMessage

Namespace: Vercel.AI.Provider

public static class ErrorMessage

Formats an unknown thrown value the way getErrorMessage does.

Inheritance: object

View source

public static string GetErrorMessage(object? error)

Returns a display string for <code class=“paramref”>error</code>. Null and undefined become unknown error, strings are returned as-is, exceptions use ToString(), and other values are JSON.

Parameters

Name Type Description
error object

Returns: string

View source

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