This repository was archived by the owner on May 14, 2024. It is now read-only.
This repository was archived by the owner on May 14, 2024. It is now read-only.
TypeError: req.toObject is not a function #908
Open
Description
I was trying to run a ldap server instance referred by the example provided by the ldapjs documentation with Node.js v20.
server.add('ou=users, o=myhost', pre, (req, res, next) => {
...
const entry = req.toObject().attributes;
...
}
Then I tried to invoke this handler by invoking the LDAPAdd
provided by the OpenLDAP.
However, the requests fails. I tried to hook up the server with pino logger and this time it provides me with an error message.
{
"msg":"127.0.0.1:57282::1 uncaught exception: TypeError: req.toObject is not a function at Server.<anonymous>..."
}
Is this example out of date in v3 or did I miss something here?