hey,
i am just starting to work with the API, something really frustrating with the return messages with errors.
below is what i get when trying to create an object, what i was excepted as a programmer that each individual error type will have a different error code that i can compare, and not to "parse" the error message to understand what is the type of error message to handle.
do you think different ?
do you get different responses?
APIResponse({
"data": {
"code": "err_validation_failed",
"errors": [
{
"message": "More than one object named 'FTP' exists."
}
],
"message": "Validation failed with 1 warning and 1 error",
"warnings": [
{
"message": "The port is already used by another service."
}
]
},
"error_message": "code: err_validation_failed\nmessage: Validation failed with 1 warning and 1 error\nwarnings: \n- message: The port is already used by another service.\nerrors: \n- message: More than one object named 'FTP' exists.\n",
"res_obj": {
"data": {
"code": "err_validation_failed",
"errors": [
{
"message": "More than one object named 'FTP' exists."
}
],
"message": "Validation failed with 1 warning and 1 error",
"warnings": [
{
"message": "The port is already used by another service."
}
]
},
"status_code": 400
},
"status_code": 400,
"success": false
})