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

Class InternalProviderError

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

Source from the content-addressed store, hash-verified

642 * @since 4.0.0
643 */
644export class InternalProviderError extends Schema.Error<InternalProviderError>(
645 "effect/ai/AiError/InternalProviderError"
646)({
647 _tag: Schema.tag("InternalProviderError"),
648 description: Schema.String,
649 metadata: providerMetadataWithDefaults<InternalProviderErrorMetadata>(),
650 http: Schema.optional(HttpContext)
651}) {
652 /**
653 * Marks `InternalProviderError` as a semantic AI error reason for runtime guards.
654 *
655 * @since 4.0.0
656 */
657 readonly [ReasonTypeId] = ReasonTypeId
658
659 /**
660 * Internal provider errors are typically transient and are retryable.
661 *
662 * @since 4.0.0
663 */
664 get isRetryable(): boolean {
665 return true
666 }
667
668 override get message(): string {
669 return `Internal provider error: ${this.description}`
670 }
671}
672
673/**
674 * Error indicating failure to parse or validate LLM output.

Callers

nothing calls this directly

Calls 2

tagMethod · 0.65

Tested by

no test coverage detected