Make JSON errors more user friendly and less crash prone