Copyright | (c) 2025 Tushar Adhatrao |
---|---|
License | MIT |
Maintainer | Tushar Adhatrao <[email protected]> |
Stability | experimental |
Safe Haskell | None |
Language | Haskell2010 |
Data.Ollama.Common.Error
Contents
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.
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
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.