From b75663bba3b67bd93dacc5b30bb49eb844af2512 Mon Sep 17 00:00:00 2001 From: Alyanna Santos Date: Tue, 3 Dec 2024 15:31:46 -0500 Subject: [PATCH] fix: only log client-level errors --- lib/graphql-hive/client.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/graphql-hive/client.rb b/lib/graphql-hive/client.rb index ea4ae28..ca2fcc4 100644 --- a/lib/graphql-hive/client.rb +++ b/lib/graphql-hive/client.rb @@ -24,7 +24,7 @@ def send(path, body, _log_type) request = build_request(uri, body) response = http.request(request) - if response.code.to_i != 200 + if response.code.to_i >= 400 && response.code.to_i < 500 @options[:logger].warn("Unsuccessful response: #{response.code} - #{response.body}") end