Skip to content

Misleading error message when checking response okcodes #2172

@reenjii

Description

@reenjii

When gophercloud receives a response from OpenStack, it checks HTTP response code against a list of OK codes.
This list is either specific to the call being made or generic according to the HTTP verb.

In the latter scenario, when a wrong code is received, an error is returned that does not contains the actual list of expected OK codes. It is misleading because you may think the list of accepted codes is not correctly defined.

Expected HTTP response code [] when accessing [DELETE http://127.0.0.1:35195], but got 200 instead OK

Message should be

Expected HTTP response code [202 204] when accessing [DELETE http://127.0.0.1:35195], but got 200 instead OK

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