Correct docs about which event is fired

In the documentation it states a 'failure' event is fired when a JSON
string could not be parsed, but the fired event is 'error'.
Merge pull request #2605 from SergioCrisostomo/fix-2489

Correct docs about which event is fired