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

Thoughts on using github.com/pkg/errors for errors #189

Closed
dvic opened this issue Mar 28, 2018 · 5 comments
Closed

Thoughts on using github.com/pkg/errors for errors #189

dvic opened this issue Mar 28, 2018 · 5 comments

Comments

@dvic
Copy link
Contributor

dvic commented Mar 28, 2018

I'd like to propose the idea of using github.com/pkg/errors for errors.

Logging regular errors and panic errors could give us proper stack traces which makes debugging / fixing problems much easier because you can see from where the error has been returned.

I have already applied this on our fork (see https://travis-ci.org/qdentity/graphql-go) and all tests pass.

I'm happy to create a PR if this idea is also useful for this repo.

@tonyghita
Copy link
Member

I think adding a stacktrace is a good idea. I believe the preference for this library is to keep external dependencies minimal.

Maybe there exists a way to get the stacktraces without adding the dependency? What do you think about that?

@dvic
Copy link
Contributor Author

dvic commented Apr 4, 2018

The github.com/pkg/errors is very small, we could just copy the bare minimal structs and API that we need to get nice stacktraces and proper error formatting. The license of pkg/errors is the BSD 2-Clause "Simplified" License. Is this an option? Let me know, I'm willing to put this into a PR :)

@tonyghita
Copy link
Member

Yes I would consider that an option 👍

@mitar
Copy link

mitar commented Oct 9, 2023

github.com/pkg/errors has been archived and is not maintained anymore. You should maybe consider switching to something else instead as you are updating error handling?

Shameless plug: you can switch it to drop-in replacement gitlab.com/tozd/go/errors. It fixes many issues, is maintained, and supports modern Go's error patterns (sentinel errors, %w formatting, joined errors, etc.).

@pavelnikolov
Copy link
Member

I'm closing this issue as it doesn't currently solve some issue with this library.

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

No branches or pull requests

4 participants