bitpay/ruby-client — pull request #21 by heisler3030 (2014-11-15 01:01:58+00:00)
Title: Better errors

* Changes to support passthrough of errors from the API. Previously we were providing misleading error codes in a lot of cases
* Added a test to make sure these passed through appropriately
* Moved the "load_tokens" call out of the initialize method. In the pairing use case, this throws an error, since the client is not yet paired. Refactored the "get_token" method to call load_tokens if the token is not found directly.
* Also corrected a minor error in the test formatting that was hardcoding a value instead of using the helper constant