| 899 | * @since 4.0.0 |
| 900 | */ |
| 901 | export class UnknownError extends Schema.Error<UnknownError>( |
| 902 | "effect/ai/AiError/UnknownError" |
| 903 | )({ |
| 904 | _tag: Schema.tag("UnknownError"), |
| 905 | description: Schema.optional(Schema.String), |
| 906 | metadata: providerMetadataWithDefaults<UnknownErrorMetadata>(), |
| 907 | http: Schema.optional(HttpContext) |
| 908 | }) { |
| 909 | /** |
| 910 | * Marks `UnknownError` as a semantic AI error reason for runtime guards. |
| 911 | * |
| 912 | * @since 4.0.0 |
| 913 | */ |
| 914 | readonly [ReasonTypeId] = ReasonTypeId |
| 915 | |
| 916 | /** |
| 917 | * Unknown errors are not retryable by default. |
| 918 | * |
| 919 | * @since 4.0.0 |
| 920 | */ |
| 921 | get isRetryable(): boolean { |
| 922 | return false |
| 923 | } |
| 924 | |
| 925 | override get message(): string { |
| 926 | return this.description ?? "Unknown error" |
| 927 | } |
| 928 | } |
| 929 | |
| 930 | // ============================================================================= |
| 931 | // Tool Call Error Types |
nothing calls this directly
no test coverage detected