Add API error handle in wizard

Change-Id: I9ed6144717dd5d635a86c9ece6b7bc5057ad10a2