Skip to content

client::get_key() should allow the caller to distinguish item not found from an actual error. #43

@ximon18

Description

@ximon18

From NLnetLabs/cascade-hsm-bridge#32 (comment).

Currently get_key() cannot distinguish, nor can its callers, between item not found and an actual error, both result in an internal error.

If get_key() could return Result<Option< instead that would allow the caller to distinguish the cases.

Alternatively, if the do_request() fn did not hide the actual error (item not found) by mapping it to a generic internal error, the callers would be able to detect item not found as the actual error.

Either way, some improvement is needed here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions