title: Boto3 AWS API error responses for SSM
body: <p>I am using a simple boto3 script to retrieve a parameter from SSM param store in my aws account. The python script looks like below:</p>
  
  <pre><code>client = get_boto3_client('ssm', 'us-east-1')
  try:
      response = client.get_parameter(Name='my_param_name',WithDecryption=True)
  except Exception as e:
      logging.error("retrieve param error: {0}".format(e))
      raise e
  return response
  </code></pre>
  
  <p>If the given parameter is not available, I get a generic error in the response like below:</p>
  
  <pre><code> An error occurred (ParameterNotFound) when calling the GetParameter operation: Parameter my_param_name not found.   
  </code></pre>
  
  <p>I have verified method signature from <a href="http://boto3.readthedocs.io/en/latest/reference/services/ssm.html#SSM.Client.get_parameter" rel="noreferrer">boto3 ssm docs</a>. Related <a href="https://docs.aws.amazon.com/systems-manager/latest/APIReference/API_GetParameter.html" rel="noreferrer">AWS API Docs</a> confirms to return a 400 response when parameter does not exist in the param store.</p>
  
  <p>My question is that how do I verify if the exception caught in the response is actually a 400 status code so that I can handle it accordingly. </p>