instructure / pandarus

A Ruby library for the Canvas API (and code generator for other languages, eventually)
34 stars 25 forks source link

handle_response doesn't take into account the response code #31

Open brendonlow opened 5 years ago

brendonlow commented 5 years ago

pandarus-0.7.0/lib/pandarus/remote_collection.rb:43

The response doesn't take into account response_code so error responses are being returned without any messaging as if valid data.

It should probably raise an error appropriate for the situation rather than passing through ‘unknown’ data to the virtus gem and having it raise an error due to the ‘unknown’ data being invalid