ollama-haskell-0.2.0.0: Haskell client for ollama.
Copyright(c) 2025 Tushar Adhatrao
LicenseMIT
MaintainerTushar Adhatrao <[email protected]>
Stabilityexperimental
Safe HaskellNone
LanguageHaskell2010

Data.Ollama.Common.Error

Description

Overview

Defines the core OllamaError type that wraps all potential errors encountered while interacting with the Ollama API, including HTTP errors, JSON decoding failures, API-specific errors, file I/O errors, and timeouts.

Synopsis

Error Types

data OllamaError Source #

Represents all possible errors that may occur when using the Ollama client.

Since: 0.2.0.0

Constructors

HttpError HttpException

Low-level HTTP exception (connection failure, etc.)

DecodeError DecodingErrorMessage DecodingFailedValue

Failure to decode a JSON response, includes message and raw value

ApiError Text

Error returned from Ollama's HTTP API

FileError IOException

Error during file operations (e.g., loading an image)

JsonSchemaError String

Mismatch in expected JSON schema or structure

TimeoutError String

Request timed out

InvalidRequest String

Request is malformed or violates input constraints

Instances

Instances details
Exception OllamaError Source # 
Instance details

Defined in Data.Ollama.Common.Error

Generic OllamaError Source # 
Instance details

Defined in Data.Ollama.Common.Error

Associated Types

type Rep OllamaError 
Instance details

Defined in Data.Ollama.Common.Error

Show OllamaError Source # 
Instance details

Defined in Data.Ollama.Common.Error

Eq OllamaError Source # 
Instance details

Defined in Data.Ollama.Common.Error

type Rep OllamaError Source # 
Instance details

Defined in Data.Ollama.Common.Error

Decoding Utilities

type DecodingErrorMessage = String Source #

Type alias for a decoding error message string.

type DecodingFailedValue = String Source #

Type alias for the value that failed to decode.