add json error report handling