When building a RESTful API and a user provides an id of resource that does not exist, should you return 404 Not Found
or 400 Bad Request
.
For example:
https://api.domain.com/v1/resource/foobar
Where foobar does not exist.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…