Handle JSON parsing errors sanely.