Skip to content

Commit 610384e

Browse files
committed
fix
1 parent 3845aac commit 610384e

File tree

1 file changed

+1
-9
lines changed

1 file changed

+1
-9
lines changed

instrumentation/ratpack/ratpack-1.4/testing/src/main/java/io/opentelemetry/instrumentation/ratpack/client/AbstractRatpackHttpClientTest.java

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
import static io.opentelemetry.semconv.ServerAttributes.SERVER_ADDRESS;
1010
import static io.opentelemetry.semconv.ServerAttributes.SERVER_PORT;
1111

12-
import io.netty.handler.codec.PrematureChannelClosureException;
1312
import io.netty.handler.timeout.ReadTimeoutException;
1413
import io.opentelemetry.api.common.AttributeKey;
1514
import io.opentelemetry.instrumentation.testing.junit.http.AbstractHttpClientTest;
@@ -172,14 +171,7 @@ private static Throwable nettyClientSpanErrorMapper(URI uri, Throwable exception
172171
if (uri.getPath().equals("/read-timeout")) {
173172
return ReadTimeoutException.INSTANCE;
174173
}
175-
// For non-routable address, Netty produces PrematureChannelClosureException on both platforms
176-
if (uri.toString().equals("https://192.0.2.1/")) {
177-
return new PrematureChannelClosureException();
178-
}
179-
// For unopened port, keep the platform-specific exception
180-
if (uri.toString().equals("http://localhost:61/")) {
181-
return exception;
182-
}
174+
// For connection errors, return the actual exception
183175
return exception;
184176
}
185177

0 commit comments

Comments
 (0)