Repository: quarkusio/quarkus
Issue: NullPointerException in Reactive REST Client

### Describe the bug

There is a NullPointerException in the quarkus reactive rest client (at least in version 2.13.3.Final and 2.14.0.CR1): 

```
java.lang.NullPointerException
at org.jboss.resteasy.reactive.common.jaxrs.AbstractResponseBuilder.setAllHeaders(AbstractResponseBuilder.java:134)
at org.jboss.resteasy.reactive.client.handlers.ClientResponseCompleteRestHandler.mapToResponse(ClientResponseCompleteRestHandler.java:45)
at io.quarkus.rest.client.reactive.runtime.MicroProfileRestClientResponseFilter.filter(MicroProfileRestClientResponseFilter.java:35)
at org.jboss.resteasy.reactive.client.handlers.ClientResponseFilterRestHandler.handle(ClientResponseFilterRestHandler.java:21)
at org.jboss.resteasy.reactive.client.handlers.ClientResponseFilterRestHandler.handle(ClientResponseFilterRestHandler.java:10)
at org.jboss.resteasy.reactive.common.core.AbstractResteasyReactiveContext.invokeHandler(AbstractResteasyReactiveContext.java:229)
at org.jboss.resteasy.reactive.common.core.AbstractResteasyReactiveContext.run(AbstractResteasyReactiveContext.java:145)
at org.jboss.resteasy.reactive.client.impl.RestClientRequestContext$1.lambda$execute$0(RestClientRequestContext.java:279)
at io.vertx.core.impl.ContextInternal.dispatch(ContextInternal.java:264)
at io.vertx.core.impl.ContextInternal.dispatch(ContextInternal.java:246)
at io.vertx.core.impl.EventLoopContext.lambda$runOnContext$0(EventLoopContext.java:43)
at io.netty.util.concurrent.AbstractEventExecutor.runTask(AbstractEventExecutor.java:174)
at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:167)
at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:470)
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:569)
at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:997)
at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
at java.base/java.lang.Thread.run(Thread.java:829)

```

I managed to create a reproducer, see https://github.com/simonbaeumler/quarkus-rest-client-reactive-npe-reproducer
To see the NullPointerException, just execute the test ExtensionsResourceTest.customTest() in the reproducer.

So far I have pinned down the Exception happening only with this two conditions present:
* The rest-client has a custom exeption handler defined (see e.g. class org.acme.rest.client.ApiExceptionMapper in the reproducer)
* The rest-client runs in a read-timeout. 


### Expected behavior

An IllegalStateException that will be raised in the caller method of the RestClient.

### Actual behavior

An NullPointerException is thrown that cannot be catched by the caller method of the RestClient.

### How to Reproduce?

See https://github.com/simonbaeumler/quarkus-rest-client-reactive-npe-reproducer
To see the NullPointerException, just execute the test ExtensionsResourceTest.customTest() in the reproducer.

### Output of `uname -a` or `ver`

_No response_

### Output of `java -version`

openjdk version "11.0.16.1" 2022-08-12 OpenJDK Runtime Environment (Red_Hat-11.0.16.1.1-1.fc35) (build 11.0.16.1+1) OpenJDK 64-Bit Server VM (Red_Hat-11.0.16.1.1-1.fc35) (build 11.0.16.1+1, mixed mode, sharing)

### GraalVM version (if different from Java)

_No response_

### Quarkus version or git rev

2.13.3.Final

### Build tool (ie. output of `mvnw --version` or `gradlew --version`)

_No response_

### Additional information

_No response_

Changed files:
independent-projects/resteasy-reactive/common/runtime/src/main/java/org/jboss/resteasy/reactive/common/jaxrs/AbstractResponseBuilder.java

diff --git a/independent-projects/resteasy-reactive/common/runtime/src/main/java/org/jboss/resteasy/reactive/common/jaxrs/AbstractResponseBuilder.java b/independent-projects/resteasy-reactive/common/runtime/src/main/java/org/jboss/resteasy/reactive/common/jaxrs/AbstractResponseBuilder.java
index 591867ed4b8..27a43da67ef 100644
--- a/independent-projects/resteasy-reactive/common/runtime/src/main/java/org/jboss/resteasy/reactive/common/jaxrs/AbstractResponseBuilder.java
+++ b/independent-projects/resteasy-reactive/common/runtime/src/main/java/org/jboss/resteasy/reactive/common/jaxrs/AbstractResponseBuilder.java
@@ -131,9 +131,11 @@ public <T extends ResponseImpl> T populateResponse(T response, boolean copyHeade
     }
 
     public void setAllHeaders(MultivaluedMap<String, String> values) {
-        for (Map.Entry<String, List<String>> i : values.entrySet()) {
-            for (String v : i.getValue()) {
-                metadata.add(i.getKey(), v);
+        if (values != null) {
+            for (Map.Entry<String, List<String>> i : values.entrySet()) {
+                for (String v : i.getValue()) {
+                    metadata.add(i.getKey(), v);
+                }
             }
         }
     }