ImageGenerationError
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
- Known subtypes
-
class ImageAuthenticationErrorclass ImageRateLimitErrortrait ImageServiceErrorclass ImageUnknownErrorclass ImageValidationErrorclass InvalidPromptErrorclass UnsupportedOperation