Sha256: eef96e03235b78159465a0efefa84152e424dd3fb134585aa646a773a12446b5

Contents?: true

Size: 526 Bytes

Versions: 10

Compression:

Stored size: 526 Bytes

Contents

module RubyBox 
  class RubyBoxError < StandardError
    attr_accessor :body, :status

    def initialize(error_json, status, body)
      @status = status
      @body = body
      @error_json = error_json
    end

    def [](key)
      @error_json[key]
    end
  end

  class ObjectNotFound < StandardError; end
  class AuthError < RubyBoxError; end
  class RequestError < RubyBoxError; end
  class ServerError < RubyBoxError; end
  class ItemNameInUse < RubyBoxError; end
  class UnshareableResource < StandardError; end
end

Version data entries

10 entries across 10 versions & 4 rubygems

Version Path
ruby-box-updated-1.16.0 lib/ruby-box/exceptions.rb
lti-ruby-box-1.14.2 lib/ruby-box/exceptions.rb
ruby-box-1.15.0 lib/ruby-box/exceptions.rb
iora-ruby-box-1.14.0 lib/ruby-box/exceptions.rb
lti-ruby-box-1.14.1 lib/ruby-box/exceptions.rb
ruby-box-1.14.0 lib/ruby-box/exceptions.rb
ruby-box-1.13.0 lib/ruby-box/exceptions.rb
ruby-box-1.12.2 lib/ruby-box/exceptions.rb
ruby-box-1.12.1 lib/ruby-box/exceptions.rb
ruby-box-1.11.1 lib/ruby-box/exceptions.rb