Improve doPrepareInternal error messages

Bug: 73229
Change-Id: Iee6c478d02c3d6f8d5f7d516c799d9bd53b0272f
Merge "Improve doPrepareInternal error messages"