code: function tryGetSession (req) {
    var cookies = req.sessionCookies
    var name = req.sessionKey
    var opts = req.sessionOptions
  
    var str = cookies.get(name, opts)
  
    if (!str) {
      return undefined
    }
  
    debug('parse %s', str)
  
    try {
      return Session.deserialize(req, str)
    } catch (err) {
      return undefined
    }
  }
docs: Try getting a session from a request.
  @private