on_error can lead to delete object. do not access this after call.