catch json parsing errors