lib/talkbird/result/exception.rb in talkbird-0.0.3 vs lib/talkbird/result/exception.rb in talkbird-0.0.4

- old
+ new

@@ -1,14 +1,19 @@ # frozen_string_literal: true module Talkbird module Result # Class representing a result as an exception. - class Exception < Basic + class Exception + attr_reader :body + attr_reader :result + attr_reader :exception + def initialize(exception, result) - @exception = exception @result = result + @exception = exception + @body = { error: exception.message } end end end end