Add error checking in handle retry.