cs3org / reva

WebDAV/gRPC/HTTP high performance server to link high level clients to storage backends
https://reva.link
Apache License 2.0
167 stars 113 forks source link

Proper error wrapping #1075

Open refs opened 4 years ago

refs commented 4 years ago

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:

https://github.com/cs3org/reva/pull/1064

labkode commented 4 years ago

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

refs commented 4 years ago

@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 commented 4 years ago

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

labkode commented 4 years ago

Done