conekta/conekta-ruby — pull request #10 by mariochavez (2014-09-17 04:35:23+00:00)
Title: Fix an exception on setting locale to request header

Fix an exception on setting locale to request header, as rubyst is common to set locales with a symbol other than a string. When setting locale as string `Conekta.locale = 'es'` everything works but when `Conekta.local = :es` is set an exception happen at the point where locale is set on header, exception is masked by the begin block when assigment happen an a misleading error is shown:

> Could not connect to https://api.conekta.io
> Conekta::NoConnectionError

In the way that you are trapping errors the stack trace is lost and it is hard to debug this kind of issues.