Skip to content
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.

Missing LDAP Result Codes in errors.js #970

@riekan

Description

@riekan

I'm encountering issues with LDAP Result Code 118 (CANCELED) using ldapjs version 3.0.7. The error manifests as follows:

// LDAPJS TEST ERR 118 undefined
/var/www/html/dev/dashboard-backend/node_modules/ldapjs/lib/errors/index.js:100
  return new E(res.errorMessage || errObj.message,
                                          ^

TypeError: Cannot read properties of undefined (reading 'message')
    at module.exports.getError (/var/www/html/dev/dashboard-backend/node_modules/ldapjs/lib/errors/index.js:100:43)
    at messageCallback (/var/www/html/dev/dashboard-backend/node_modules/ldapjs/lib/client/client.js:1267:45)
    at Parser.onMessage (/var/www/html/dev/dashboard-backend/node_modules/ldapjs/lib/client/client.js:925:14)
    at Parser.emit (node:events:518:28)
    at Parser.write (/var/www/html/dev/dashboard-backend/node_modules/ldapjs/lib/messages/parser.js:135:8)
    at TLSSocket.onData (/var/www/html/dev/dashboard-backend/node_modules/ldapjs/lib/client/client.js:875:22)
    at TLSSocket.emit (node:events:518:28)
    at addChunk (node:internal/streams/readable:559:12)
    at readableAddChunkPushByteMode (node:internal/streams/readable:510:3)
    at Readable.push (node:internal/streams/readable:390:5)

Node.js v20.11.1

Upon reviewing errors.js, I noticed several missing codes (https://ldap.com/ldap-result-code-reference/), which likely contributed to the problem.

Please let me know if further adjustments or details are required.

Thank you in advance.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions