fix(http-client): null-check message
ci/woodpecker/manual/woodpecker Pipeline was successful Details

This commit is contained in:
Johannes Frohnmeyer 2024-02-22 20:00:43 +01:00
parent d72724f1fd
commit cb2d9bfc65
Signed by: Johannes
GPG Key ID: E76429612C2929F4
1 changed files with 2 additions and 1 deletions

View File

@ -170,7 +170,8 @@ public class HttpClient {
} catch (InterruptedException e) {
throw new IOException("Could not send request", e);
} catch (IOException e) {
if (e.getMessage().contains("GOAWAY received")) {
String message = e.getMessage();
if (message != null && message.contains("GOAWAY received")) {
return handleRetryAfter(accept, responseBodyHandler, retryAfterDefault);
} else throw new IOException("Could not send request", e);
}