mateodelnorte/forecast.io — pull request #8 by quarterto (2014-05-27 15:26:57+00:00)
Title: Test response mime type before parsing json

Before, if a non-json error was sent back, it was not surfaced to the user, but replaced with a JSON `SyntaxError`. This commit wraps any error message in a `ForecastError` and sends it to the error parameter of the callback.