title: Testing 400 status code axios throws error
body: <p>I'm creating an api test framework for a project I am working on and I'm looking to validate required fields in JSON objects being sent to an endpoint. </p>
  
  <p>I'm trying to send a JSON object with a missing field and expecting a 400 response from my application with a validation message. But when making this call with axios it (somewhat rightly) throws an error as it received the 400. </p>
  
  <p>I want to be able to assert that 400 is expected and to assert on the validation message. </p>
  
  <p>All the examples I've come across are all regarding dealing with the 400 response in the correct way you would if you are not expecting the 400 response, but i am expecting it. </p>
  
  <p>I couldn't seem to find anyone else trying this. </p>
  
  <pre><code>async function createReminder(reminderObject) {
    const response = await axios.post(`${config.get('baseUrl')}/reminder`, {
      ...reminderObject
    });
  
    return response;
  }
  
  module.exports.createReminder = createReminder;
  </code></pre>
  
  <p>Here is my working code as it stands. This will make a valid 200 when being used with a valid call. </p>
  
  <p>I need to have the 400 response / validation message be returned in teh response object to be handled in the function that calls this function.</p>