rescue JSON errors