What is optimal HTTP response Code when not reporting 200 (everything OK) but error in input?
Like, you submit some data to server, and it will response that your data is wrong
using 500
looks more like Server Issue
using 200
with warning/error response text is bad (allowing caching and everything is not OK)
using 204
and returning nothing, is maybe good (but well supported?)
using 404
is wrong if requested path (script) is available and in proper place
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…