Skip to content

improvement: wrap parse errors with helpful context for AI clients #32

Description

@castrojo

Finding

When bootc returns invalid JSON, the MCP error is: invalid character 'x' looking for beginning of value
An AI agent can't help the user with that.

Fix

Wrap errors at the system layer:

if err := json.Unmarshal(data, &s); err != nil {
    return nil, fmt.Errorf("bootc status returned unparseable JSON (is bootc up to date?): %w", err)
}

Apply to all parse errors in internal/system/*.go.

Labels: enhancement, priority:low

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestpriority:lowNice to have, low urgency

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions