Skip to content

Print actual error on 400 Bad Request #280

@margold

Description

@margold

In case when a request fails due to json validation, the response contains a path field:

400 Bad Request
{"status": "error", "message": "\'\' is too short", "path": "$.comments[0].messages[0].from"}

CLI currently only prints the message, which is uninformative on its own and does not help a casual user fix their request. It should also print the path if it's available (fine to assume that it's only available on 400 Bad Request responses).

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions