Complete the code to add a nested error message inside the main error response.
{
"error": {
"message": "Invalid request",
"details": [1]
}
}The details field should be a string describing the nested error message.
Complete the code to include a nested error object with a code and message.
{
"error": {
"message": "Validation failed",
"details": {
"code": [1],
"message": "Email is invalid"
}
}
}The code should be a number without quotes to represent the error code.
Fix the error in the nested error response by completing the missing key.
{
"error": {
"message": "Request failed",
"details": {
[1]: "Missing required parameter 'id'"
}
}
}The nested error object should have a message key describing the error.
Fill both blanks to correctly nest multiple error messages inside the details array.
{
"error": {
"message": "Multiple errors",
"details": [
{"field": [1], "message": "Required"},
{"field": [2], "message": "Invalid format"}
]
}
}The first error is about the 'username' field and the second about the 'email' field.
Fill all three blanks to create a nested error response with a code, field, and message.
{
"error": {
"code": [1],
"details": {
"field": [2],
"message": [3]
}
}
}The main error code is 400, the field is 'email', and the message explains the missing email.