Skip to content

Commit

Permalink
Parse exception detail OR message
Browse files Browse the repository at this point in the history
  • Loading branch information
alexstoick committed Dec 19, 2024
1 parent 755a3e2 commit a495586
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
7 changes: 6 additions & 1 deletion lib/ruby_snowflake/client.rb
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,12 @@ def initialize(details)
end

def message
@details
if @details == {}
super
else
@details.to_s
end

end
end

Expand Down
2 changes: 1 addition & 1 deletion lib/ruby_snowflake/version.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module RubySnowflake
VERSION = "1.1.4"
VERSION = "1.1.5"
end
3 changes: 2 additions & 1 deletion spec/ruby_snowflake/client_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -101,8 +101,9 @@
expect { result }.to raise_error do |error|
expect(error).to be_a RubySnowflake::QueryTimeoutError
end
# We are not receiving this error because we cancel it before Snowflake can
expect(client.logger).not_to have_received(:error).with(a_string_including("cancel query"))
expect(Time.now.to_i - start_time).to be_between(1.0, 5)
expect(Time.now.to_i - start_time).to be >= 1 #query timeout
end
end

Expand Down

0 comments on commit a495586

Please sign in to comment.