Skip to content

Commit

Permalink
fix: refactor code
Browse files Browse the repository at this point in the history
Co-authored-by: Arya Bhimani <[email protected]>
  • Loading branch information
al-yanna and aryascripts authored Dec 5, 2024
1 parent 4668a49 commit bd49ad3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/graphql-hive/client.rb
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ def send(path, body, _log_type)
http = setup_http(uri)
request = build_request(uri, body)
response = http.request(request)

if response.code.to_i >= 400 && response.code.to_i < 500
code = response.code.to_i
if code >= 400 && code < 500
error_message = "Unsuccessful response: #{response.code} - #{response.message}"
extract_error_details(response)&.then { |details| error_message += ": [#{details}]" }
@options[:logger].warn(error_message)
Expand Down

0 comments on commit bd49ad3

Please sign in to comment.