If you include an error code in a JSON error usually it is a map:

errors[10] = "TestAndSet value required"
errors[11] = "TestAndSet PrevValue required"

That way someone can handle an error without string comparisons. Sending along 400 for everything isn't really helpful- it would be better just to drop the error number in this case.