Skip to content

NotImplemented error should say what method wasn't implemented by what implementation #572

@carols10cents

Description

@carols10cents

Is your feature request related to a problem or challenge? Please describe what you are trying to do.

I was running some tests that did a bunch of object store requests. I saw in my logs this message:

error: Operation not yet implemented.

which was a printout of the NotImplemented variant of object_store::Error:

/// Error when an operation is not implemented
#[error("Operation not yet implemented.")]
NotImplemented,

My test was doing many different object store operations, so it was frustrating that this error didn't tell me which operation exactly wasn't supported. I was also pretty sure which object store implementation I was using, but I thought I was doing supported operations and clearly wasn't, so I was questioning whether I had the implementation correct or not too.

Describe the solution you'd like

It would be nice if this error's message contained the name of the method/operation that wasn't implemented, as well as which implementation of the ObjectStore trait didn't support this method.

I eventually figured out that my problem was doing a call to put_opts on a local file system object store with PutMode::Update. In this case, it would have been nice to see something like:

error: Operation `put_opts` with `PutMode::Update` not yet implemented for `LocalFileSystem`.

Describe alternatives you've considered

Yes, I could be adding more context onto errors myself, but it'd be nice if object_store added what it could.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions