AmazonBedrockErrors
Namespace: Vercel.AI.AmazonBedrock
public static class AmazonBedrockErrorsMaps a Bedrock JSON error body onto the SDK exception hierarchy.
Inheritance: object
Methods
Section titled “Methods”Create(int, string?)
Section titled “Create(int, string?)”public static ApiException Create(int statusCode, string? body)Creates the status exception, using the Bedrock type prefix when the body has one.
Parameters
| Name | Type | Description |
|---|---|---|
statusCode |
int | |
body |
string |
Returns: ApiException
FormatMessage(string?)
Section titled “FormatMessage(string?)”public static string? FormatMessage(string? body)Returns the provider message. When type is present the message is {type}: {message}.
Parameters
| Name | Type | Description |
|---|---|---|
body |
string |
Returns: string
FormatMessage(JsonElement)
Section titled “FormatMessage(JsonElement)”public static string? FormatMessage(JsonElement root)Formats a parsed Bedrock error object.
Parameters
| Name | Type | Description |
|---|---|---|
root |
JsonElement |
Returns: string
Apache-2.0 · Copyright 2023 Vercel, Inc. · unofficial community port, not an official Vercel product