 
         unless referrer
           # if referrer not fonud then do nothing and return
-          return callback "Referrer couldn't found"
+          return callback new KodingError "Referrer couldn't found"
 
         callback null, referrer
 


  do ->

    fetchReferrer = (account, callback)->

      unless referrerUsername = account.referrerUsername
        return callback "User doesn't have any referrer"

      # get referrer
      JAccount.one 'profile.nickname': referrerUsername, (err, referrer)->

        ->

          if me.referralUsed
            return logError "User already get the referrer"

          fetchReferrer me, (err, _referrer)->
            return logError err  if err

            referrer = _referrer
            queue.next()

        ->

          me.update $set: "referralUsed": yes, (err)->
            return logError err if err
            queue.next()

        ->

          confirmRewards referrer, me, (err)->
            return logError err if err
            queue.next()

        ->

          confirmRewards me, referrer, (err)->
            return logError err if err
            queue.next()

      ]
