Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Print actual error on 400 Bad Request #280

Open
margold opened this issue Jun 25, 2024 · 0 comments
Open

Print actual error on 400 Bad Request #280

margold opened this issue Jun 25, 2024 · 0 comments
Labels
good first issue Good for newcomers

Comments

@margold
Copy link
Contributor

margold commented Jun 25, 2024

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).

@margold margold added the good first issue Good for newcomers label Jun 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

1 participant