fastruby / harvesting

Ruby wrapper for the Harvest API v2
MIT License
28 stars 30 forks source link

TimeEntry: Delete with a 404 code will raise `NoMethodError` #60

Closed Jmarques closed 3 years ago

Jmarques commented 4 years ago

https://github.com/fastruby/harvesting/blob/e98c0dca8331911e8176c4179b0d65c893db8508/lib/harvesting/client.rb#L118

Will raise *** NoMethodError Exception: undefined methodUnprocessableRequest'`

fix:

raise UnprocessableRequest.new(response.to_s) unless response.code.to_i == 200 

Thanks for the gem, it's great quality. I'll try to make a PR to add some behaviours, but I didn't find the time to add the tests yet.