title: Why resttemplate is not throwing UnknownHttpStatusCodeException but java.lang.IllegalArgumentException?
body: <p>Why resttemplate is not throwing UnknownHttpStatusCodeException but &quot;java.lang.IllegalArgumentException: No matching constant for [0] while using RestTemplate&quot; when an unknown http status code is received?</p>
  <p>eg: when RestTemplate.exchange() method returns  an unknown (or custom) HTTP status code, it is supposed to throw UnknownHttpStatusCodeException but actually I found that it returns java.lang.IllegalArgumentException: No matching constant for [0].</p>