add handle error for grid