Skip to content

Support more error values when handling HTTP status codes #747

@ab116699

Description

@ab116699

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).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions