Skip to content

Refactor ResponseStatus #56

@ionut-arm

Description

@ionut-arm

The ResponseStatus enum is currently defined as a monolithic enum holding all possible values. While not entirely wrong, the usability of the type could be improved by re-arranging the variants into logical groups. This would also entail a refactoring of all types related to error management.

Proposed changes:

  • a Result<T> type would still be available, however the error type would not be a ResponseStatus but a new ErrorStatus type; this is to prevent a logical error of having an error of type Success
  • thus, ResponseStatus will be an enum with two variants: Success and Error(ErrorStatus)
  • ErrorStatus will be further split into Service(ServiceError) (for internal service-related errors) and Psa(Error) (for errors related to the functionality of Parsec, generally returned from providers) - the error contained within the variant will be directly drawn from the psa-crypto Rust crate

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestmediumEffort label

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions