Send error codes when client sends a bad request

[#54881728]

Signed-off-by: Alex Jackson <ajackson@pivotallabs.com>