export
default
{
200
:
‘The request was handled correctly and the result returned’
.
201
:
‘Data added or modified successfully’
.
202
:
‘The request has been queued and is being processed asynchronously’
.
203
:
‘Token or login status invalid’
.
204
:
‘Data deleted successfully’
.
301
:
‘Requested resources are permanently redirected to new locations and will be rerequested from new addresses’
.
302
:
‘Requested resource temporarily redirected to new location’
.
400
:
‘Error in request parameter, server does not create or modify data’
.
401
:
‘No access, incorrect user name, password, token’
.
403
:
‘Access is authorized, but access is forbidden’
.
404
:
‘Accessing a non-existent resource’
.
405
:
‘Requested in incorrect manner’
.
406
:
‘Requested data format is not the type received by the service’
.
410
:
‘Requested resource permanently deleted’
.
422
:
‘An error occurred while the server was creating an object’
.
500
:
‘Server not available, not returning correct data’
.
502
:
‘Server gateway error’
.
503
:
‘Server overloads or under maintenance’
.
504
:
‘Server response timed out’
.
}
For online projects, if the error response and prompt are not encapsulated, the user will be confused, resulting in poor user experience. At the same time, it is difficult to collect errors and locate problems. For small programs of Alipay and wechat, the audit requires friendly prompt and feedback processing for error messages, otherwise the health score of small programs and traffic distribution will be affected.
If the project is for the third party, the development can’t again after the completion of commissioning, when found mistake what problem is extremely difficult to locate, is the client or server error, a status code prompt to don’t understand development personnel can quickly report problem type, in order to take corresponding measures to remedy in time, especially for electricity or online trading is particularly important to the project.