Sha256: 0bd06d574b80e9fbfc4f3d1127a2acc116203ac83a4e37fb1d3c7b0a99513df6

Contents?: true

Size: 466 Bytes

Versions: 1

Compression:

Stored size: 466 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

1 entries across 1 versions & 1 rubygems

Version Path
microsoft_graph-0.1.2 lib/odata/errors.rb