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

Support more error values when handling HTTP status codes #747

Open
ab116699 opened this issue Jul 28, 2023 · 0 comments
Open

Support more error values when handling HTTP status codes #747

ab116699 opened this issue Jul 28, 2023 · 0 comments

Comments

@ab116699
Copy link

Currently the go-tfe package only handles a subset of HTTP status codes, by handle I mean that it exposes an error type that package users can match against. For example HTTP status code 404 is mapped to ErrResourceNotFound, I would like to request that other errors than can be caused by a conflict be also exposed. The main one I am looking for is for HTTP status code 409 when a resource already exists, the package would expose ErrResourceAlreadyExists.

I have a patch available for the change here if feature request is accepted I can make a feature complete PR (please clarify the contributing requirements for small fixes like this one with regards to tests that may need to be added).

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

1 participant