Skip to content

Please consider fixing more bad APIs in v2.0 #2902

@majewsky

Description

@majewsky

I saw that you put out a v2.0.0 beta, and the breaking changes are very tame. Since this is a unique opportunity, I wonder how many thoughts have been spent on improving the core APIs. Specifically, I have two requests:

  • Please consider removing all the Err4xxer interfaces and ErrDefault4xx structs without replacement, and just returning ErrUnexpectedResponseCode instead. Or at the very least, these types should be documented much better to explain what their purpose is. As far as I can tell, all they do is ruin good error messages unless you know how to get rid of them.

  • The context.Context support added in the previous release is pretty much worthless since all the structured API methods do not take ctx arguments. This is the best possible moment to fix that, and add a ctx argument to every method that wraps ProviderClient.Request or ServiceClient.Request. The variants of those methods without ctx arguments should be removed.

This just off the top of my head, there's probably more. Please consider using this opportunity if at all possible.

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