send 400 if there is an error with error message