Why resttemplate is not throwing UnknownHttpStatusCodeException but "java.lang.IllegalArgumentException: No matching constant for [0] while using RestTemplate" when an unknown http status code is received?
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].