Thanks, I've been meaning to research how to enrich my response errors.
I mostly use the combination of HTTP status code + error message in JSON now but I want to explore how to provide more information to the client without breaking compatibility.
How do you deal with the situation where there are multiple errors? Do you send back a list of errors or a generic one?
You may have noticed in the example JSON I used in the post that the response is always an array. So if there are more than one errors then we just add those many entries of error object in the array.
Thanks, I've been meaning to research how to enrich my response errors.
I mostly use the combination of HTTP status code + error message in JSON now but I want to explore how to provide more information to the client without breaking compatibility.
How do you deal with the situation where there are multiple errors? Do you send back a list of errors or a generic one?
You may have noticed in the example JSON I used in the post that the response is always an array. So if there are more than one errors then we just add those many entries of error object in the array.
sorry, I missed that!
Thanks!