Replaced JSON parsing error with a simple one

In order to not give unnecessary information to a potential attacker.
Issue #691.