Skip to content

Commit 82241c7

Browse files
committed
Fix
1 parent 2b3d8f9 commit 82241c7

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

instrumentation/play/play-ws/play-ws-common/testing/src/main/java/io/opentelemetry/javaagent/instrumentation/playws/PlayScalaWsClientBaseTest.java

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
import java.net.URI;
1212
import java.util.Map;
1313
import java.util.concurrent.TimeUnit;
14-
import java.util.concurrent.TimeoutException;
1514
import org.junit.jupiter.api.AfterEach;
1615
import org.junit.jupiter.api.BeforeEach;
1716
import play.api.libs.ws.StandaloneWSClient;
@@ -67,15 +66,15 @@ public StandaloneWSRequest buildRequest(String method, URI uri, Map<String, Stri
6766
@Override
6867
public int sendRequest(
6968
StandaloneWSRequest request, String method, URI uri, Map<String, String> headers)
70-
throws InterruptedException, TimeoutException {
69+
throws Exception {
7170
Future<StandaloneWSResponse> futureResponse = request.execute();
7271
Await.ready(futureResponse, Duration.apply(10, TimeUnit.SECONDS));
7372
Try<StandaloneWSResponse> value = futureResponse.value().get();
7473
if (value.isSuccess()) {
7574
return value.get().status();
7675
}
77-
// Catch the Throwable and rethrow it as an IllegalStateException
78-
throw new IllegalStateException(value.failed().get());
76+
// Catch the Throwable and rethrow it
77+
throw (Exception) value.failed().get();
7978
}
8079

8180
@Override

0 commit comments

Comments
 (0)