I've been integrating TextMagic into an existing app, and it's been pretty painful because when something goes wrong all I get is Textmagic::REST::RequestError: Validation Failed which isn't helpful.
At the very least, when an error occurs please provide a way to to get the actual response:
lib/textmagic-ruby/rest/client.rb#L116-L118 - Here I would expose the actual response, as just raising Textmagic::REST::ServerError doesn't tell me anything about what went wrong
lib/textmagic-ruby/rest/client.rb#L133-L135 - Here I would return the actual response, as just knowing that the response was a 401 error doesn't help diagnose the issue, but seeing the error from the API would
I'd also like to see the request and response in my application logs (at least the url requested, response code and timings, but more would be better). Please add a logger and a way to override it - I want to use the Rails logger, but for non-Rails apps I'd like to be able to specify something else.
(I've just noticed that the latest Git version has better error exposing than the release version - please update the version on RubyGems and add a CHANGELOG)
I've been integrating TextMagic into an existing app, and it's been pretty painful because when something goes wrong all I get is
Textmagic::REST::RequestError: Validation Failed
which isn't helpful.At the very least, when an error occurs please provide a way to to get the actual response:
Textmagic::REST::ServerError
doesn't tell me anything about what went wrongI'd also like to see the request and response in my application logs (at least the url requested, response code and timings, but more would be better). Please add a logger and a way to override it - I want to use the Rails logger, but for non-Rails apps I'd like to be able to specify something else.
(I've just noticed that the latest Git version has better error exposing than the release version - please update the version on RubyGems and add a CHANGELOG)