My spring boot is of Microservice architecture. Getting 500 Internal Server error logged in calling microservice.
Service A calls Service B with POST request. And Service B processed the request successfully and got 200 status code in Service B logs. But Service A returned 500 Internal Server error with Service Unavailable error. Facing this error, few times intermittently
**Calling Service Logs:**
`DEBUG o.s.w.s.m.m.a.ExceptionHandlerExceptionResolver - Resolved [org.springframework.web.client.HttpServerErrorException$InternalServerError: **500 Internal Server Error**: [<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8">
<title>**Service Unavailable**</... (511 bytes)]]
2023-07-14 14:08:02.943 [http-nio-61010-exec-239] DEBUG o.s.web.servlet.DispatcherServlet - Completed 500 **INTERNAL_SERVER_ERROR**`
**Called Microservice Status:**
Completed 200 OK
Rest template is used to call between Microservices
@Bean
public RestTemplate getRestTemplate(RestTemplateBuilder builder) {
return builder.build();
}
Please help to resolve this issue
Expecting microservice calls to be return 200 status code if processed successfully