reillyforshaw/box_view — pull request #2 by brettg (2014-03-19 20:09:20+00:00)
Title: Raise exceptions for known API error states

Namely, for HTTP response code 202 responses (with a Retry-After header set) and 400 Bad Request responses. Both as per the [View API docs](https://developers.box.com/view/).

Otherwise these responses where raising unrelated errors (e.g. a 202 for a `DocumentSession` that ended up in something along the lines of a `nil.each` call) or unexpected values (e.g. a JSON body with error messages for a requested `Document#thumbnail` that was too large).