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).
Currently the
go-tfepackage 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 toErrResourceNotFound, 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 exposeErrResourceAlreadyExists.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).