Sha256: a6c3fa2660d6c747286a07d873df2db8aac8696eb8804c01641e0651670e81c4

Contents?: true

Size: 484 Bytes

Versions: 3

Compression:

Stored size: 484 Bytes

Contents

module OData
  class Error < RuntimeError; end

  class HTTPError < Error
    def initialize(response)
      body = JSON.parse(response.body)
      super "#{response.code} #{body['error']['code']}: \"#{body['error']['message']}\" from \"#{response.uri}\""
    rescue
      super
    end
  end

  class ClientError < HTTPError; end
  class ServerError < HTTPError; end

  class AuthenticationError < ClientError; end
  class AuthorizationError < ClientError; end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
microsoft_graph-0.1.3 lib/odata/errors.rb
microsoft_graph-0.1.1 lib/odata/errors.rb
microsoft_graph-0.1.0 lib/odata/errors.rb