“The strongest of all warriors are these two — Time and Patience.” ― Leo Tolstoy, War and Peace
“The strongest of all warriors are these two — Time and Patience.” ― Leo Tolstoy, War and Peace
Pete Letkeman wrote:
This is due to the fact that even though the HTTP request is fine the data returned may not be for whatever reason.
Ekaterina Galkina wrote:Could you give an example? For example, the user with such email exists,
“The strongest of all warriors are these two — Time and Patience.” ― Leo Tolstoy, War and Peace
Ekaterina Galkina wrote:So is the status field needed just to clarify the reason or the error?
“The strongest of all warriors are these two — Time and Patience.” ― Leo Tolstoy, War and Peace
“The strongest of all warriors are these two — Time and Patience.” ― Leo Tolstoy, War and Peace
Ekaterina Galkina wrote:BTW, is it POSSIBLE to include message body into 4XX response and doesn't it violate any rules
Ekaterina Galkina wrote:I have this question because I've never seen any content in browsers if a page can't be loaded because of 4XX error.
“The strongest of all warriors are these two — Time and Patience.” ― Leo Tolstoy, War and Peace
Ekaterina Galkina wrote:... What to return if there was an error creating user? I can set status code HttpStatus.CONFLICT (409) or return 200 but design a special field in JSON for status ...
Ron McLeod wrote:
401 Not Authorized - requestor not authorized (usually triggers client-side to provide credentials or answer to a challenge)
Pete Letkeman wrote:From what I gather the HTTP status code like 200, 400, 404 etc should be used for the information about the communication stream.
Ekaterina Galkina wrote:Thank you
Ron McLeod wrote:
401 Not Authorized - requestor not authorized (usually triggers client-side to provide credentials or answer to a challenge)
And what's the reason why Google returns 200 if requester not authorized - API key not provided
https://maps.googleapis.com/maps/api/place/nearbysearch/json?location=-33.8670,151.1957&radius=500&types=food&name=cruise&key=YOUR_API_KEY