Fix error handling for create