Updated json error exception PR to include suggested code improvements