Changed default error code to 400