NoHttpResponseException on localhost

Hi, in my spring boot application, I am sending request to get issues of my project to my sentry server with the address localhost:8090. When i send the same request from Postman, it responds but in the application, it throws exception as below:

The target server failed to respond; nested exception is org.apache.http.NoHttpResponseException: The target server failed to respond

When I debug it, it works but with the debug disabled it does not respond and throw exception.

It looks like a networking setup issue on your end. Without more information it is hard to tell you more.

But other endpoints are working like getting projects with “/api/0/projects/” . It is specific to issues endpoint.

The issue requests hit the endpoints matching the pattern /api/[1-9]\d* which is routed to the relay service instead of the web service. That might be the issue for you.

My request is “/api/0/projects/{organization_slug}/{project_slug}/issues/?query={level_query}+{period_query}”. Are these endpoints also routed to the relay service?

Nope, all /api/0 requests (should) go to the web service.