GatewayForbiddenError
Namespace: Vercel.AI.Gateway
public sealed class GatewayForbiddenError : GatewayError, ISerializableThe request was rejected by policy.
Inheritance: object → Exception → AiSdkException → GatewayError
Implements: ISerializable
Constructors
Section titled “Constructors”GatewayForbiddenError(string?, int, Exception?, string?, string?)
Section titled “GatewayForbiddenError(string?, int, Exception?, string?, string?)”public GatewayForbiddenError(string? message = null, int statusCode = 403, Exception? cause = null, string? generationId = null, string? ruleId = null)Creates a forbidden error.
Parameters
| Name | Type | Description |
|---|---|---|
message |
string | |
statusCode |
int | |
cause |
Exception | |
generationId |
string | |
ruleId |
string |
Properties
Section titled “Properties”RuleId
Section titled “RuleId”public string? RuleId { get; }Routing rule id, when param.ruleId was a string.
Value: string
public override string Type { get; }Gateway error type.
Value: string
Methods
Section titled “Methods”IsInstance(Exception?)
Section titled “IsInstance(Exception?)”public static bool IsInstance(Exception? error)True when <code class=“paramref”>error</code> is this error.
Parameters
| Name | Type | Description |
|---|---|---|
error |
Exception |
Returns: bool
Apache-2.0 · Copyright 2023 Vercel, Inc. · unofficial community port, not an official Vercel product