Skip to content
This repository has been archived by the owner on Jan 9, 2024. It is now read-only.

Commit

Permalink
Merge pull request #15 from rinsed-org/fix/respond-to-sentry-context
Browse files Browse the repository at this point in the history
Rename `details` to `sentry_context`
  • Loading branch information
alexstoick authored Jun 21, 2023
2 parents 700d325 + ac0ae57 commit 296fa7a
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
6 changes: 4 additions & 2 deletions lib/ruby_snowflake_client.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion lib/ruby_snowflake_client/version.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module RubySnowflakeClient
VERSION = '1.1.0'
VERSION = '1.1.1'
end
2 changes: 1 addition & 1 deletion spec/snowflake/client_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 296fa7a

Please sign in to comment.