Created
April 27, 2022 20:56
-
-
Save rfmeier/9bcf9269c0168d0a39eaae77554ab47d to your computer and use it in GitHub Desktop.
WP REST json response for a WP_Error
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"code": "name", | |
"message": "Name is required", | |
"data": { | |
"status": 400 | |
}, | |
"additional_data": [ | |
{ | |
"status": 400 | |
} | |
], | |
"additional_errors": [ | |
{ | |
"code": "name", | |
"message": "A second Name error message", | |
"data": { | |
"status": 400 | |
}, | |
"additional_data": [ | |
{ | |
"status": 400 | |
} | |
] | |
}, | |
{ | |
"code": "name", | |
"message": "A third Name error message", | |
"data": { | |
"status": 400 | |
}, | |
"additional_data": [ | |
{ | |
"status": 400 | |
} | |
] | |
}, | |
{ | |
"code": "email", | |
"message": "Email is required", | |
"data": { | |
"status": 400 | |
} | |
} | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment