updated PrepErrorType to PrepErrorCode