ErrorMessage
Namespace: Vercel.AI.Provider
public static class ErrorMessageFormats an unknown thrown value the way getErrorMessage does.
Inheritance: object
Methods
Section titled “Methods”GetErrorMessage(object?)
Section titled “GetErrorMessage(object?)”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
Apache-2.0 · Copyright 2023 Vercel, Inc. · unofficial community port, not an official Vercel product