diff --git a/Gemfile.lock b/Gemfile.lock index ef9a574..6396d64 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,7 +1,7 @@ PATH remote: . specs: - graphql-hive (0.4.1) + graphql-hive (0.4.2) graphql (>= 2.3, < 3) GEM diff --git a/k6/graphql-api/Gemfile.lock b/k6/graphql-api/Gemfile.lock index e244fbe..6e31aad 100644 --- a/k6/graphql-api/Gemfile.lock +++ b/k6/graphql-api/Gemfile.lock @@ -1,7 +1,7 @@ PATH remote: ../.. specs: - graphql-hive (0.4.1) + graphql-hive (0.4.2) graphql (>= 2.3, < 3) GEM diff --git a/lib/graphql-hive/client.rb b/lib/graphql-hive/client.rb index 3068b48..8a0b464 100644 --- a/lib/graphql-hive/client.rb +++ b/lib/graphql-hive/client.rb @@ -28,7 +28,6 @@ def send(path, body, _log_type) @options[:logger].debug(response.body.inspect) rescue StandardError => e @options[:logger].fatal("Failed to send data: #{e}") - raise e end def setup_http(uri) diff --git a/lib/graphql-hive/usage_reporter.rb b/lib/graphql-hive/usage_reporter.rb index d5beca1..14b2ee7 100644 --- a/lib/graphql-hive/usage_reporter.rb +++ b/lib/graphql-hive/usage_reporter.rb @@ -71,10 +71,7 @@ def start_thread rescue StandardError => e # ensure configured logger receives exception as well in setups where STDERR might not be # monitored. - @options[:logger].error('GraphQL Hive usage collection thread terminating') @options[:logger].error(e) - - raise e end end diff --git a/lib/graphql-hive/version.rb b/lib/graphql-hive/version.rb index f847a4b..7c4b276 100644 --- a/lib/graphql-hive/version.rb +++ b/lib/graphql-hive/version.rb @@ -2,6 +2,6 @@ module Graphql module Hive - VERSION = '0.4.1' + VERSION = '0.4.2' end end diff --git a/spec/graphql/graphql-hive/client_spec.rb b/spec/graphql/graphql-hive/client_spec.rb index 4bfba80..bd3f0e3 100644 --- a/spec/graphql/graphql-hive/client_spec.rb +++ b/spec/graphql/graphql-hive/client_spec.rb @@ -65,10 +65,10 @@ client.send('/usage', body, :usage) end - it 'logs a fatal error and raises an exception when an exception is raised' do + it 'logs a fatal error when an exception is raised' do allow(http).to receive(:request).and_raise(StandardError.new('Network error')) expect(options[:logger]).to receive(:fatal).with('Failed to send data: Network error') - expect { client.send('/usage', body, :usage) }.to raise_error(StandardError, 'Network error') + expect { client.send('/usage', body, :usage) }.not_to raise_error(StandardError, 'Network error') end end end