Sha256: 7592d6dd32d35f82ac73fb208cc1bf037804fbbcd921c1f318637115b2d7cbbe

Contents?: true

Size: 510 Bytes

Versions: 27

Compression:

Stored size: 510 Bytes

Contents

module Octobat
  class OctobatLibError < StandardError
    attr_reader :message
    attr_reader :http_status
    attr_reader :http_body
    attr_reader :json_body

    def initialize(message=nil, http_status=nil, http_body=nil, json_body=nil)
      @message = message
      @http_status = http_status
      @http_body = http_body
      @json_body = json_body
    end

    def to_s
      status_string = @http_status.nil? ? "" : "(Status #{@http_status}) "
      "#{status_string}#{@message}"
    end
  end
end

Version data entries

27 entries across 27 versions & 1 rubygems

Version Path
octobat-2.0.27 lib/octobat/errors/octobat_lib_error.rb
octobat-2.0.26 lib/octobat/errors/octobat_lib_error.rb
octobat-2.0.25 lib/octobat/errors/octobat_lib_error.rb
octobat-2.0.24 lib/octobat/errors/octobat_lib_error.rb
octobat-2.0.23 lib/octobat/errors/octobat_lib_error.rb
octobat-2.0.22 lib/octobat/errors/octobat_lib_error.rb
octobat-2.0.21 lib/octobat/errors/octobat_lib_error.rb
octobat-2.0.20 lib/octobat/errors/octobat_lib_error.rb
octobat-2.0.19 lib/octobat/errors/octobat_lib_error.rb
octobat-2.0.18 lib/octobat/errors/octobat_lib_error.rb
octobat-2.0.17 lib/octobat/errors/octobat_lib_error.rb
octobat-2.0.16 lib/octobat/errors/octobat_lib_error.rb
octobat-2.0.15 lib/octobat/errors/octobat_lib_error.rb
octobat-2.0.14 lib/octobat/errors/octobat_lib_error.rb
octobat-2.0.12 lib/octobat/errors/octobat_lib_error.rb
octobat-2.0.11 lib/octobat/errors/octobat_lib_error.rb
octobat-2.0.10 lib/octobat/errors/octobat_lib_error.rb
octobat-2.0.9 lib/octobat/errors/octobat_lib_error.rb
octobat-2.0.8 lib/octobat/errors/octobat_lib_error.rb
octobat-2.0.7 lib/octobat/errors/octobat_lib_error.rb