Skip to content

api: Check status code before marshalling and returning responseΒ #763

@bwplotka

Description

@bwplotka

I think this is a bug that we don't check status code before we start to do things in our client APIs code against Prometheus. Related discussion: #755 (comment)

The problem is that users can access the API through various proxies, so we can easily get 404, 403, and other 4xx or 5xx code without proper return type. This will cause very confusing unmarshalling error without even mentioning the response code. I think this is quite a serious problem and something that potential blocks Thanos to switch to those APIs.

AC:

Help wanted, I can guide someone through.

cc @beorn7 @lilic

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions