handle error.