dev add violation notion
Test Workflow / test (push) Successful in 3s

This commit is contained in:
vladp
2026-03-20 16:35:35 +07:00
parent a42f3e8ed8
commit 97d6c8317e
@@ -32,10 +32,11 @@ public class SearchImageService {
private final OkHttpClient googleHttpClient;
public SearchImageService() {
// Proxy proxy = new Proxy(Proxy.Type.HTTP,
// new InetSocketAddress("193.46.217.94", 3128));
Proxy proxy = new Proxy(Proxy.Type.HTTP,
new InetSocketAddress("193.46.217.94", 3128));
this.yandexHttpClient = new OkHttpClient.Builder()
// .proxy(proxy)
.connectTimeout(60, TimeUnit.SECONDS)
.writeTimeout(60, TimeUnit.SECONDS)
.readTimeout(60, TimeUnit.SECONDS)
@@ -148,6 +149,10 @@ public class SearchImageService {
String responseBody = body.string();
log.info("responseBody: " + responseBody);
log.info("responseBody: " + responseBody);
log.info("responseBody: " + responseBody);
if (!response.isSuccessful()) {
throw new IOException("API error " + response.code() + ": " + responseBody);
}