Skip to content

Conversation

corpix
Copy link

@corpix corpix commented Apr 5, 2025

Main motivation was fix to ListChain error to be able to handle errors.Is(err, unix.ENOENT), but then I found more errors which doesn't pass underlying error information and decided to fix them all.

Copy link

google-cla bot commented Apr 5, 2025

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@stapelberg
Copy link
Collaborator

stapelberg commented Jun 6, 2025

Thanks for your PR!

Main motivation was fix to ListChain error to be able to handle errors.Is(err, unix.ENOENT), but then I found more errors which doesn't pass underlying error information and decided to fix them all.

Changing all functions to pass through underlying errors is not “fixing them all”: Whether or not it makes sense to pass through an underlying error needs to be carefully examined on a case-by-case basis. See https://groups.google.com/g/golang-nuts/c/-bYObQTWX_8/m/9iwZrQnIBAAJ and https://matttproud.com/blog/posts/go-errors-and-api-contracts.html for rationale/discussion.

If you want to move forward with your PR, please reduce scope to only the errors you specifically care about and have tested, and then I can take another look. Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants