It is best to follow a set of return status code rules in a system, or even a team or company, and make plans in advance, for example, 0001 ~ ~ 2999,4000 ~ 4999 these code segments can be pre-planned by Business Type, merit type, and architecture level... return code specifications
It is best to follow a set of return status code rules in a system, even a team, or company, and make plans in advance, such:
0001 ~ 1999,200 0 ~ 2999,4000 ~ 4999
These code segments can be pre-planned by Business Type, merit type, and architecture level, such as x ~ Y is the network segment, which is used for the error code, and which is used for the success Code. I feel that it is clear in terms of architecture, and I will know whether it is successful or failed, then, based on the number of other bits, we can also identify the features on the business layer. we feel that these plans have the best combination effect and provide code segments. In this way, the overall planning can be unified.
ABCD four-digit
A :?
B :?
C :?
D :?
Mature systems, such as some software and websites, have a return status code in various situations or errors. I know this status code is available for every business, if there are so many businesses in a system, there must be a good return code design specification.
I would like to ask you how to design such specifications, what standards should be followed, and where can we find reference materials?
(I remember where I saw the design standard of the return code for the Meituan take-out interface. I forgot to find it now)
Reply content: return code specification
It is best to follow a set of return status code rules in a system, even a team, or company, and make plans in advance, such:
0001 ~ 1999,200 0 ~ 2999,4000 ~ 4999
These code segments can be pre-planned by Business Type, merit type, and architecture level, such as x ~ Y is the network segment, which is used for the error code, and which is used for the success Code. I feel that it is clear in terms of architecture, and I will know whether it is successful or failed, then, based on the number of other bits, we can also identify the features on the business layer. we feel that these plans have the best combination effect and provide code segments. In this way, the overall planning can be unified.
ABCD four-digit
A :?
B :?
C :?
D :?
Mature systems, such as some software and websites, have a return status code in various situations or errors. I know this status code is available for every business, if there are so many businesses in a system, there must be a good return code design specification.
I would like to ask you how to design such specifications, what standards should be followed, and where can we find reference materials?
(I remember where I saw the design standard of the return code for the Meituan take-out interface. I forgot to find it now)