Skip to content

Commit

Permalink
fix: log warning on unsuccesful response
Browse files Browse the repository at this point in the history
  • Loading branch information
al-yanna committed Dec 3, 2024
1 parent addfa11 commit 020f2fa
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/graphql-hive/client.rb
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@ def send(path, body, _log_type)
request = build_request(uri, body)
response = http.request(request)

if response.code.to_i != 200
@options[:logger].warn("Unsuccessful response: #{response.code} - #{response.body}")
end

@options[:logger].debug(response.inspect)
@options[:logger].debug(response.body.inspect)
rescue => e
Expand Down

0 comments on commit 020f2fa

Please sign in to comment.