Print actual error on 400 Bad Request
Opened this issue · 0 comments
margold commented
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).