add step at onerror

add step at onerror