Class: X::UnreadableResponse

Inherits:
Objects::Error show all
Defined in:
x-objects/lib/x/objects/errors.rb

Overview

Raised when a successful response holds what the object layer cannot read as what the API documents

It is the base of InvalidAttribute, for one value of a response, and is raised itself for what a response says beside its values, such as a page that names the token of a page before it as the next, which would have the pages requested again for good. It is not the InvalidResponse of x-core, which a body that is not JSON raises, and which holds the response.

Examples:

Rescue what the object layer cannot read of a response

begin
  user.followers.to_a
rescue X::UnreadableResponse => e
  logger.warn(e.message)
end

Direct Known Subclasses

InvalidAttribute