An HTTP 500 means the server cannot complete the request for an unforeseen reason. Which HTTP response code is best used when the server cannot complete the request for a known or expected reason?
http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html https://en.wikipedia.org/wiki/List_of_HTTP_status_codes
looking through some docs over HTTP, I can't find a good answer, and that seems like an important difference. Throwing 500 for an error that does not actually represent an “internal server error” is probably not a good practice.
RFC 2616 , , , . , IETF HTTP QUIC:
RFC2616. , ( ) .
RFC 2616 , HTTP/1.1:
, RFC 7231 - , .
:
404
403
401
501
409
301
, RFC 7231, Racksburg:
2xx
3xx
4xx
5xx
http-. , , 401 . , 401 - , , . , , , , .
200 // , , .
, 500 , . 500 , , , .
If what you are looking for is more like "the server can really evaluate the request, but found that what the user asked for some reason is impossible" (for example, some resource has been exhausted), then you probably better off with a status code + 200 + if the reason does not correspond to one of the specific codes in the 4xx range (for example, 403 for "user does not have the necessary privileges").
Source: https://habr.com/ru/post/1616640/More articles:https://translate.googleusercontent.com/translate_c?depth=1&pto=aue&rurl=translate.google.com&sl=ru&sp=nmt4&tl=en&u=https://fooobar.com/questions/1616635/clojure-android-fails-to-read-file&usg=ALkJrhgL9i3C-UsCLsol5iTw1gkn6dAArgLimit Django-Oscar dashboard users (Sandbox gateway application) - pythonImport / use of a resource from an external cloyer - javaAssociation preload and pagination - elixirafter git rebase my local branch and remote branch diverge - gitTypescript import statement - typescriptУмножьте в bash script согласно матрасам - bashRock Scroll or clone Metal Scroll for VS 2015 - visual-studio-2015Swift: pull down to close the `UITableViewController` - iosUnity: сколько tmx плиток можно запустить без запаздывания - unity3dAll Articles