handle error objects specially