catch JSON parsing errors