about back-end api interface design
Why doesn"t the backend directly use http"s status code + response body json. But to customize a format?
for example, the backend returns a 200 status code, and then uses code to represent the success or failure of the request:
{
code:0000,
data:{},
msg:""
}
compared to using http status code to express: for example, throw 500402 directly, you can see the red error request directly in the browser network, what is the advantage?