MCPcopy Create free account
hub / github.com/Effect-TS/effect / UnknownError

Class UnknownError

packages/effect/src/unstable/ai/AiError.ts:901–928  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

899 * @since 4.0.0
900 */
901export 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

Callers

nothing calls this directly

Calls 2

tagMethod · 0.65

Tested by

no test coverage detected