From ff43201402eeeb2f7a749a27ee7a42bbf90d85ea Mon Sep 17 00:00:00 2001 From: Stoica Alex Date: Wed, 21 Jun 2023 09:53:19 +0100 Subject: [PATCH 1/2] Rename `details` to `sentry_context` This will help our error reporting in Sentry - so we can understand a bit better where the errors are coming from. --- lib/ruby_snowflake_client.rb | 6 ++++-- spec/snowflake/client_spec.rb | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/lib/ruby_snowflake_client.rb b/lib/ruby_snowflake_client.rb index 5db6a23..f3284a8 100644 --- a/lib/ruby_snowflake_client.rb +++ b/lib/ruby_snowflake_client.rb @@ -5,10 +5,12 @@ module Snowflake LOG_LEVEL = 0 class Error < StandardError - attr_reader :details + # This will get pulled through to Sentry, see: + # https://github.com/getsentry/sentry-ruby/blob/11ecd254c0d2cae2b327f0348074e849095aa32d/sentry-ruby/lib/sentry/error_event.rb#L31-L33 + attr_reader :sentry_context def initialize(details) - @details = details + @sentry_context = details end end diff --git a/spec/snowflake/client_spec.rb b/spec/snowflake/client_spec.rb index 1105e0b..c2acd9b 100644 --- a/spec/snowflake/client_spec.rb +++ b/spec/snowflake/client_spec.rb @@ -58,7 +58,7 @@ it "should raise an exception" do expect { result }.to raise_error do |error| expect(error).to be_a Snowflake::Error - expect(error.details).to include( + expect(error.sentry_context).to include( sql: query ) end From ac0ae5716e60b13089d21c62a312c68721fe312f Mon Sep 17 00:00:00 2001 From: Stoica Alex Date: Wed, 21 Jun 2023 10:59:21 +0100 Subject: [PATCH 2/2] Bump version --- lib/ruby_snowflake_client/version.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ruby_snowflake_client/version.rb b/lib/ruby_snowflake_client/version.rb index 6ae78b3..d092f16 100644 --- a/lib/ruby_snowflake_client/version.rb +++ b/lib/ruby_snowflake_client/version.rb @@ -1,3 +1,3 @@ module RubySnowflakeClient - VERSION = '1.1.0' + VERSION = '1.1.1' end