ImageGenerationError

org.llm4s.imagegeneration.ImageGenerationError
sealed trait ImageGenerationError extends LLMError

Why an image generation call failed.

An org.llm4s.error.LLMError, so the client methods can return org.llm4s.error.CancelledError when their thread is interrupted - the contract of every llm4s client - next to these cases: they return Either[LLMError, _].

Every case says whether trying again can help, with a marker: LLMError.isRecoverable (and the retry policies built on it) is true only for a org.llm4s.error.RecoverableError, and every other case is a org.llm4s.error.NonRecoverableError. Recoverable: ImageRateLimitError, and an ImageServiceError whose status is transient (see ImageServiceError.isTransientStatus). Everything else is not: a rejected credential, request or prompt gets the same answer on the next call, and an ImageUnknownError is not retried blindly.

The cases that would share a name with an org.llm4s.error type carry an Image prefix (ImageAuthenticationError, ImageRateLimitError, ImageServiceError, ImageValidationError, ImageUnknownError): both families are LLMErrors, so a match on the wrong one would compile and never fire.

Attributes

Graph
Supertypes
trait LLMError
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
Known subtypes

Members list

Value members

Abstract methods

def message: String

Human-readable error message

Human-readable error message

Attributes

Inherited methods

def code: Option[String]

Optional error code for programmatic handling

Optional error code for programmatic handling

Attributes

Inherited from:
LLMError
def context: Map[String, String]

Additional context information

Additional context information

Attributes

Inherited from:
LLMError
def correlationId: Option[String]

Error correlation IDs for debugging

Error correlation IDs for debugging

Attributes

Inherited from:
LLMError
def formatted: String

Formatted error message with context

Formatted error message with context

Attributes

Inherited from:
LLMError
def productElementName(n: Int): String

Attributes

Inherited from:
Product
def productElementNames: Iterator[String]

Attributes

Inherited from:
Product
def productIterator: Iterator[Any]

Attributes

Inherited from:
Product
def productPrefix: String

Attributes

Inherited from:
Product

Inherited and Abstract methods

def canEqual(that: Any): Boolean

Attributes

Inherited from:
Equals
def productArity: Int

Attributes

Inherited from:
Product
def productElement(n: Int): Any

Attributes

Inherited from:
Product