chaitanyabm / gdata-ruby-util

Automatically exported from code.google.com/p/gdata-ruby-util
Apache License 2.0
0 stars 0 forks source link

Raising BadRequestError will itself cause error ... #5

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
When responding to an error code 400 (line 88-89 in
./gdata-1.1.0/lib/gdata/client.rb) the code will throw an error. This is
because code is passing response.body when it should be passing response

Proposed fix:

Original:

raise BadRequestError, response.body

Proposed:

raise BadRequestError.new(response)

Cheers,

Vince

Original issue reported on code.google.com by vincent...@gmail.com on 13 Jul 2009 at 10:44

GoogleCodeExporter commented 8 years ago
I'm seeing the same problem. This is really annoying b/c it hides the actual 
request
error.

Original comment by chadros...@gmail.com on 11 Sep 2009 at 6:50

GoogleCodeExporter commented 8 years ago
This seemed to fix the problem for me

sudo vi /Library/Ruby/Gems/1.8/gems/gdata-1.1.0/lib/gdata/client/base.rb

change

when 400
  raise BadRequestError, response.body

to

when 400
  raise BadRequestError.new(response)

Original comment by chadros...@gmail.com on 11 Sep 2009 at 6:55

GoogleCodeExporter commented 8 years ago
Fixed in 1.1.1 but the status here was never updated.

Original comment by jjw.ath...@gmail.com on 9 May 2010 at 11:50