-
Notifications
You must be signed in to change notification settings - Fork 20
Open
Description
Description
When using the http4s JDK HTTP client, a NullPointerException is thrown if the HttpResponse.body() is null.
This can occur, for example, when a proxy returns 407 Proxy Authentication Required.
Reference:
org/http4s/jdkhttpclient/JdkHttpClient.scala#L196
Stacktrace:
java.lang.NullPointerException: Cannot invoke "java.util.concurrent.Flow$Publisher.subscribe(java.util.concurrent.Flow$Subscriber)" because the return value of "java.net.http.HttpResponse.body()" is null
at org.http4s.jdkhttpclient.JdkHttpClient$.$anonfun$apply$9(JdkHttpClient.scala:196)
at delay @ org.http4s.jdkhttpclient.JdkHttpClient$.$anonfun$apply$8(JdkHttpClient.scala:196)
at tryGet @ org.http4s.jdkhttpclient.JdkHttpClient$.$anonfun$apply$7(JdkHttpClient.scala:183)
at flatMap @ org.http4s.jdkhttpclient.JdkHttpClient$.$anonfun$apply$7(JdkHttpClient.scala:183)
...
at parallel @ fs2.interop.flow.StreamPublisher$.apply(StreamPublisher.scala:92)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels