handle error without callback