Skip to content

Refine Errors #688

@kazk

Description

@kazk

This issue keeps track of tasks related to improving errors in kube.

Currently, kube::Error is a huge enum containing all the possible errors, and many error variants don't provide any additional context (e.g., SerdeError(#[from] serde_json::Error)). Users need to constantly ignore irrelevant error variants, and they don't know which are relevant.

The use of #[from] attribute, which derives impl From<T> for kube::Error, allows implicit conversion, so the source code doesn't help much, either. The code is slightly more concise with From, but the information is lost, allows us to be more sloppy, and not think about error cases as much as we should.

We'll start addressing this problem by removing From to force us to attach context, and gradually breaking down the error into smaller and more specific errors (proposed in #686).

Tasks

Metadata

Metadata

Assignees

No one assigned

    Labels

    errorserror handling or error ergonomics

    Type

    No type

    Projects

    Status

    In Progress

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions