Skip to content

Commit c09bb16

Browse files
committed
Avoid logging an error when getting GO AWAY
It can happen if the route is closed before the SSE client is.
1 parent 323754d commit c09bb16

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

runtime/src/main/java/io/quarkiverse/githubapp/runtime/smee/SmeeIoForwarder.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
import static io.quarkiverse.githubapp.runtime.Headers.FORWARDED_HEADERS;
44

5+
import java.io.IOException;
56
import java.net.URI;
67
import java.net.http.HttpClient;
78
import java.net.http.HttpRequest;
@@ -124,6 +125,12 @@ public void onEvent(HttpEventStreamClient client, Event event) {
124125

125126
forwardingHttpClient.send(requestBuilder.build(), BodyHandlers.discarding());
126127
}
128+
} catch (IOException e) {
129+
if (e.getMessage().contains("GOAWAY received")) {
130+
// ignore
131+
} else {
132+
LOG.error("An error occurred while forwarding a payload to the local application running in dev mode", e);
133+
}
127134
} catch (Exception e) {
128135
LOG.error("An error occurred while forwarding a payload to the local application running in dev mode", e);
129136
}

0 commit comments

Comments
 (0)