Enum Fabric Error

View as Markdown

Generated from cargo doc --no-deps -p nemo-fabric-core.

pub enum FabricError {
Show 22 variants    ResolveBaseDirectory {
        path: PathBuf,
        source: Error,
    },
    PathNotFound(PathBuf),
    UnknownAdapter {
        adapter_id: String,
        available: Vec<String>,
    },
    AdapterDescriptorMismatch {
        path: PathBuf,
        field: &'static str,
        expected: String,
        actual: String,
    },
    AdapterDescriptorUnsupported {
        adapter_id: String,
        field: &'static str,
        value: String,
    },
    InvalidAdapterDescriptor {
        path: PathBuf,
        message: String,
    },
    InvalidHarnessSettings {
        adapter_id: String,
        descriptor_source: AdapterDescriptorSource,
        descriptor_path: PathBuf,
        settings_path: String,
        reason: String,
    },
    InvalidConfig {
        field: String,
        reason: String,
    },
    AdapterCompatibility {
        adapter_id: String,
        field: String,
        reason: String,
    },
    UnknownSchema {
        schema: String,
        available: Vec<String>,
    },
    UnsupportedRuntimeAdapter {
        harness: String,
        adapter_kind: AdapterKind,
    },
    AdapterLifecycleOperation {
        operation: &'static str,
        runtime_id: String,
        code: String,
        message: String,
        diagnostics: String,
    },
    RuntimeHandleMismatch {
        field: &'static str,
        expected: String,
        actual: String,
        runtime_id: String,
    },
    UnsupportedEnvironmentProvider {
        provider: String,
        adapter_kind: AdapterKind,
    },
    InvalidProcessSettings {
        path: PathBuf,
        source: Error,
    },
    InvalidPythonSettings {
        path: PathBuf,
        source: Error,
    },
    PythonInterpreterUnavailable {
        path: PathBuf,
        origin: String,
        reason: String,
    },
    ProcessRunner {
        command: String,
        source: Error,
    },
    SerializeJson(Error),
    Read {
        path: PathBuf,
        source: Error,
    },
    Write {
        path: PathBuf,
        source: Error,
    },
    ParseJson {
        path: PathBuf,
        source: Error,
    },
}

Errors raised by NeMo Fabric config loading and validation.

Variants

ResolveBaseDirectory

ResolveBaseDirectory

The base directory could not be resolved to an absolute path.

Fields

path: PathBuf

Base directory supplied by the caller.

source: Error

Underlying path-resolution error.

PathNotFound(PathBuf)

PathNotFound(PathBuf)

The requested path does not exist.

UnknownAdapter

UnknownAdapter

A requested adapter id is not present in the agent config.

Fields

adapter_id: String

Requested adapter id.

available: Vec<String>

Available adapter ids.

AdapterDescriptorMismatch

AdapterDescriptorMismatch

An adapter descriptor did not match the selected harness config.

Fields

path: PathBuf

Adapter descriptor path.

field: &'static str

Mismatched field.

expected: String

Expected value.

actual: String

Actual value.

AdapterDescriptorUnsupported

AdapterDescriptorUnsupported

An adapter descriptor does not support a selected config value.

Fields

adapter_id: String

Adapter id.

field: &'static str

Unsupported field.

value: String

Unsupported value.

InvalidAdapterDescriptor

InvalidAdapterDescriptor

An adapter descriptor is malformed.

Fields

path: PathBuf

Adapter descriptor path.

message: String

Validation message.

InvalidHarnessSettings

InvalidHarnessSettings

Adapter-owned harness settings do not satisfy the resolved descriptor schema.

Fields

adapter_id: String

Selected adapter id.

descriptor_source: AdapterDescriptorSource

Registry source of the selected descriptor.

descriptor_path: PathBuf

Path to the selected descriptor.

settings_path: String

Canonical path to the invalid setting.

reason: String

Schema validation failure.

InvalidConfig

InvalidConfig

A normalized Fabric config field is invalid.

Fields

field: String

Canonical configuration path.

reason: String

Validation failure.

AdapterCompatibility

AdapterCompatibility

A valid normalized field cannot be implemented by the selected adapter.

Fields

adapter_id: String

Selected adapter id.

field: String

Canonical configuration path.

reason: String

Compatibility failure.

UnknownSchema

UnknownSchema

A requested schema is not known.

Fields

schema: String

Requested schema name.

available: Vec<String>

Available schema names.

UnsupportedRuntimeAdapter

UnsupportedRuntimeAdapter

Runtime invocation is not supported for the selected adapter.

Fields

harness: String

Harness type.

adapter_kind: AdapterKind

Adapter kind.

AdapterLifecycleOperation

AdapterLifecycleOperation

A persistent local-host lifecycle operation failed.

Fields

operation: &'static str

Lifecycle operation that failed.

runtime_id: String

Runtime whose host failed.

code: String

Stable failure code.

message: String

Human-readable failure message.

diagnostics: String

Bounded adapter-host diagnostics.

RuntimeHandleMismatch

RuntimeHandleMismatch

A runtime handle was used with a different run plan than the one that created it.

Fields

field: &'static str

Mismatched runtime handle field.

expected: String

Expected value from the run plan.

actual: String

Actual value from the runtime handle.

runtime_id: String

Runtime handle id.

UnsupportedEnvironmentProvider

UnsupportedEnvironmentProvider

An environment provider is not runnable for the selected adapter in this POC.

Fields

provider: String

Environment provider.

adapter_kind: AdapterKind

Adapter kind.

InvalidProcessSettings

InvalidProcessSettings

Process adapter settings were invalid.

Fields

path: PathBuf

Config path.

source: Error

Underlying JSON parse error.

InvalidPythonSettings

InvalidPythonSettings

Python adapter settings were invalid.

Fields

path: PathBuf

Config path.

source: Error

Underlying JSON parse error.

PythonInterpreterUnavailable

PythonInterpreterUnavailable

The resolved Python adapter interpreter could not be used.

Fields

path: PathBuf

Resolved interpreter path.

origin: String

Human-readable description of where the interpreter was resolved from.

reason: String

Why the interpreter cannot be used.

ProcessRunner

ProcessRunner

A process runner failed to start or complete.

Fields

command: String

Command being run.

source: Error

Underlying IO error.

SerializeJson(Error)

SerializeJson(Error)

JSON serialization failed.

Read

Read

Filesystem read failed.

Fields

path: PathBuf

File path.

source: Error

Underlying IO error.

Write

Write

Filesystem write failed.

Fields

path: PathBuf

File path.

source: Error

Underlying IO error.

ParseJson

ParseJson

JSON parse failed.

Fields

path: PathBuf

File path.

source: Error

Underlying JSON error.

Trait Implementations

impl Debug for FabricError

impl Debug for FabricError

fmt

fn fmt(&self, f: &mut Formatter<'_>) -> Result

impl Display for FabricError

impl Display for FabricError

fmt

fn fmt(&self, __formatter: &mut Formatter<'_>) -> Result

impl Error for FabricError

impl Error for FabricError

source

fn source(&self) -> Option<&(dyn Error + 'static)>

description

fn description(&self) -> &str

cause

fn cause(&self) -> Option<&dyn Error>

provide

fn provide<'a>(&'a self, request: &mut Request<'a>)