Fix error handling in createList

Change-Id: I10211f2a20da119ae6a4a1bb2f768a3fa2ab87da