Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Define a library wide error type #14

Closed
Nuttymoon opened this issue Feb 7, 2023 · 0 comments · Fixed by #19
Closed

Define a library wide error type #14

Nuttymoon opened this issue Feb 7, 2023 · 0 comments · Fixed by #19
Assignees
Labels
enhancement New feature or request

Comments

@Nuttymoon
Copy link
Contributor

With the library growing, I think defining a library Wide error type becomes necessary. Returning String as error does not scale well, and is hard to decide what to do from an user point of view.

Having something like this would help people consuming the library's life incredibly better (it could also be useful for the CLI -> towards the best approach I was talking about before)

enum AshError {
    NetworkError(String),
    SubnetError {id: Id, msg: String},
    ...
}

Originally posted by @gboutry in #10 (review)

@Nuttymoon Nuttymoon changed the title With Define a library wide error type Define a library wide error type Feb 7, 2023
@Nuttymoon Nuttymoon added enhancement New feature or request lib labels Feb 7, 2023
@Nuttymoon Nuttymoon self-assigned this Mar 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant