HTTP status code for “success with errors”?

后端 未结 3 1861

I\'ve poked around a bit, but I don\'t see an HTTP status code for when a request\'s succeeds, but there is an error after the \"point of no return\".

e.g., Say you

3条回答
  •  南方客
    南方客 (楼主)
    2021-01-04 14:59

    If the server is aware that it has encountered a problem, it should normally return a 5xx error. The most generic one is the 500 Server Error, which the RFC 2616 defines as follows:

    500 Internal Server Error

    The server encountered an unexpected condition which prevented it from fulfilling the request.

    Then it's the client's responsibility to reattempt the request. If the previous request was partially committed, it's the server's (or the database's) responsibility to roll that back, or to handle the duplicate transaction appropriately.

提交回复
热议问题