when i use below code , what is the case to get HttpStatusCodeException
exception .
ResponseEntity<Object> response =
restTemplate.exchange(builder.build().encode().toUri(), HttpMethod.GET, entity, Object.class);
Please can anyone help out ????????
According to documentation there are two types of HttpStatusCodeException
HttpClientErrorException
and HttpServerErrorException
.
so you can just use ResponseEntity.BodyBuilder.status(505) for example to raise an HttpServerErrorException
in your