-
Notifications
You must be signed in to change notification settings - Fork 86
Closed
Labels
Description
TL;DR
We currently print the invalid input errors the same way we print all other errors.
The invalid input error holds additional details about the reasons why the invalid input error occurred, this data is not shown to the users.
$ hcloud server create --name "a a" --image debian-12 --type cpx11
hcloud: invalid input in field 'name' (invalid_input, 6ea253683232ea88)
Expected behavior
Handle invalid input errors and print all the details for the users to fully understand why the invalid input error failed. Below is an example of invalid input error with the details:
{
"error": {
"message": "invalid input in field 'name'",
"code": "invalid_input",
"details": {
"fields": [
{
"name": "name",
"messages": [
"Name must be a valid hostname."
]
}
]
}
}
}
phm07