pinpoint-apm/pinpoint · error · RuntimeException

RuntimeException wrapping IOException from getStatusCode

Error message

RuntimeException wrapping IOException from getStatusCode

What it means

Guard in Spring6HttpStatusProvider.getStatusCode: calling ClientHttpResponse.getStatusCode() on the instrumented response threw IOException (stream/connection failure while reading status); the provider wraps it in a RuntimeException so the interceptor can surface the failure.

Solutions

  1. Inspect the wrapped IOException cause for the underlying connection/stream problem
  2. Ensure the HTTP response stream is still open when the status code is read in the RestTemplate interceptor
  3. Upgrade the resttemplate plugin if the wrap behavior is too aggressive for your Spring 6 version
Defensive patterns

Strategy: try-catch

When it happens

Trigger: Thrown at agent-module/plugins/resttemplate/src/main/java/com/navercorp/pinpoint/plugin/resttemplate/interceptor/util/Spring6HttpStatusProvider.java:33 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of pinpoint-apm/pinpoint@744c3d3075 (2026-09-07). Data as JSON: /api/errors/883b13c74e179ed7. Report an issue: GitHub.

Appendix: source

Thrown at agent-module/plugins/resttemplate/src/main/java/com/navercorp/pinpoint/plugin/resttemplate/interceptor/util/Spring6HttpStatusProvider.java:33

 */
package com.navercorp.pinpoint.plugin.resttemplate.interceptor.util;

import org.springframework.http.client.ClientHttpResponse;

import java.io.IOException;

/**
 * @author intr3p1d
 */
public class Spring6HttpStatusProvider implements HttpStatusProvider {
    @Override
    public int getStatusCode(Object target) {
        if (target instanceof ClientHttpResponse) {
            final ClientHttpResponse response = (ClientHttpResponse) target;
            try {
                return response.getStatusCode().value();
            } catch (IOException e) {
                throw new RuntimeException(e);
            }
        }
        return -1;
    }
}

View on GitHub (pinned to 744c3d3075)