Returning empty for "data not found" forces the client to check both return status and the content returned. This approach does to save the client from checking the return status because they need to check for errors resulting from environmental faults anyways.
"If you have nothing to give, give nothing [...]" is correct in the form of a "not found status", not in the form of a made up content albeit empty. Besides, can the client use an empty payload in all cases when it is expecting a predefined model in the content? It is just pretzel programming to torpedo established client expectation.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Returning empty for "data not found" forces the client to check both return status and the content returned. This approach does to save the client from checking the return status because they need to check for errors resulting from environmental faults anyways.
"If you have nothing to give, give nothing [...]" is correct in the form of a "not found status", not in the form of a made up content albeit empty. Besides, can the client use an empty payload in all cases when it is expecting a predefined model in the content? It is just pretzel programming to torpedo established client expectation.