replaced default error status code with 400