Alexandr: I like to use both – return a status code so anything that cares can see it, then make the body of the thing a sensible error message.

Caius: You are providing us good and sensible advice, thanks for dropping by :)

lifeforms: I have no idea how the codes get decided upon but I do see your point. I end up returning a general error code with a meaningful message usually – the advantage of this is that I can stack error messages and return lots of feedback to the user in one go