add code to count trapped JSON errors to requests