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

Proper error wrapping #1075

Open
refs opened this issue Aug 11, 2020 · 4 comments
Open

Proper error wrapping #1075

refs opened this issue Aug 11, 2020 · 4 comments

Comments

@refs
Copy link
Member

refs commented Aug 11, 2020

context:

While working on this we realized we're using errors.Wrap all over the place on owncloud.go. GetMD(). I believe we should wrap on the lowest layers, in the context of this PR that would be getPath() and unwrapping on the top layers to assert on the underlying error type.

more context:

#1064

@refs refs added the needs decision Needs decision before commiting to implement label Aug 11, 2020
@labkode
Copy link
Member

labkode commented Aug 11, 2020

We should also take the opportunity to use the std new error library:
https://golang.org/pkg/errors/

@refs
Copy link
Member Author

refs commented Aug 12, 2020

@labkode YES PLEASE. I was on talks about that with Jorn and Vincent yesterday. Dave's Chenney spoke his mind in moving away from gh/pkg/errors to the stdlib.

@refs
Copy link
Member Author

refs commented Aug 12, 2020

@labkode does it make sense to add technical debt label to the repo, to capture all this?

@labkode
Copy link
Member

labkode commented Aug 12, 2020

Done

@refs refs removed the needs decision Needs decision before commiting to implement label Aug 12, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants