Conjure.Error exception (Conjure v0.1.1-alpha)
View SourceError types for Conjure operations.
Provides structured errors with context for debugging and error handling. All Conjure errors include a type, message, and optional details map.
Error Types
:skill_not_found- Skill with given name not found in registry:invalid_frontmatter- SKILL.md frontmatter is malformed or missing required fields:invalid_skill_structure- Skill directory structure is invalid:file_not_found- Requested file does not exist:permission_denied- Access to path is not allowed:execution_failed- Tool execution failed:execution_timeout- Tool execution timed out:docker_unavailable- Docker is not available or not running:container_error- Container operation failed:max_iterations_reached- Conversation loop exceeded maximum iterations
Anthropic Skills API Errors
:anthropic_api_error- Anthropic API returned an error response:skills_limit_exceeded- More than 8 skills specified (API limit):skill_upload_failed- Failed to upload skill to Anthropic:pause_turn_max_exceeded- Too many pause_turn iterations:container_not_found- Container ID is invalid or expired:file_download_failed- Failed to download file from Files API:invalid_skill_spec- Invalid skill specification tuple
Native Execution Errors
:not_a_native_skill- Module does not implement NativeSkill behaviour:native_callback_missing- Required callback not implemented:native_execution_failed- Native skill callback returned an error
Storage Errors
:storage_init_failed- Storage backend initialization failed:storage_cleanup_failed- Storage cleanup failed:storage_write_failed- Writing to storage failed:storage_read_failed- Reading from storage failed
Example
case Conjure.load_skill("/invalid/path") do
{:ok, skill} -> skill
{:error, %Conjure.Error{type: :file_not_found} = error} ->
Logger.warning("Skill not found: #{error.message}")
end
Summary
Functions
Creates an Anthropic API error.
Creates a container error.
Creates a container not found error.
Creates a Docker unavailable error.
Creates an execution failed error.
Creates an execution timeout error.
Creates a file download failed error.
Creates a file not found error.
Creates an invalid frontmatter error.
Creates an invalid skill spec error.
Creates an invalid skill structure error.
Creates a max iterations reached error.
Creates a missing API callback error.
Creates a native callback missing error.
Creates a native execution failed error.
Creates a not a native skill error.
Creates a path not allowed error.
Creates a pause_turn max exceeded error.
Creates a permission denied error.
Creates a skill not found error.
Creates a skill upload failed error.
Creates a skills limit exceeded error.
Creates a storage cleanup failed error.
Creates a storage initialization failed error.
Creates a storage read failed error.
Creates a storage write failed error.
Wraps a raw error into a Conjure.Error.
Creates a ZIP error.
Types
@type error_type() ::
:skill_not_found
| :invalid_frontmatter
| :invalid_skill_structure
| :file_not_found
| :permission_denied
| :path_not_allowed
| :execution_failed
| :execution_timeout
| :docker_unavailable
| :container_error
| :api_error
| :max_iterations_reached
| :zip_error
| :anthropic_api_error
| :skills_limit_exceeded
| :skill_upload_failed
| :pause_turn_max_exceeded
| :container_not_found
| :file_download_failed
| :invalid_skill_spec
| :not_a_native_skill
| :native_callback_missing
| :native_execution_failed
| :storage_init_failed
| :storage_cleanup_failed
| :storage_write_failed
| :storage_read_failed
| :unknown
@type t() :: %Conjure.Error{ __exception__: true, details: map(), message: String.t(), type: error_type() }
Functions
Creates an Anthropic API error.
Used when the Anthropic API returns an error response.
Creates a container error.
Creates a container not found error.
Creates an execution failed error.
@spec execution_timeout(String.t(), pos_integer()) :: t()
Creates an execution timeout error.
Creates a file download failed error.
Creates a file not found error.
Creates an invalid frontmatter error.
Creates an invalid skill spec error.
Creates an invalid skill structure error.
@spec max_iterations_reached(pos_integer()) :: t()
Creates a max iterations reached error.
Creates a missing API callback error.
Returned when an API callback is required but not provided.
Creates a native callback missing error.
Returned when a required callback is not implemented by the skill module.
Creates a native execution failed error.
Returned when a native skill callback returns an error.
Creates a not a native skill error.
Returned when a module does not implement the NativeSkill behaviour.
Creates a path not allowed error.
@spec pause_turn_max_exceeded(pos_integer(), pos_integer()) :: t()
Creates a pause_turn max exceeded error.
Returned when the conversation loop exceeds maximum pause_turn iterations.
Creates a permission denied error.
Creates a skill not found error.
Creates a skill upload failed error.
@spec skills_limit_exceeded(pos_integer(), pos_integer()) :: t()
Creates a skills limit exceeded error.
Anthropic Skills API supports a maximum of 8 skills per request.
Creates a storage cleanup failed error.
Returned when storage cleanup fails.
Creates a storage initialization failed error.
Returned when storage backend initialization fails.
Creates a storage read failed error.
Returned when reading from storage fails.
Creates a storage write failed error.
Returned when writing to storage fails.
Wraps a raw error into a Conjure.Error.
Creates a ZIP error.