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

Open

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.

Activity

  1. jsumners commented on Mar 6, 2024

    @jsumners
    Member

    Please provide a minimal reproducible example (MRE). Doing so will help us diagnose your issue. It should be the bare minimum code needed to trigger the issue, and easily runnable without any changes or extra code. Please review the integration tests, e.g. issue-940.test.js, for examples of good MREs.

    You may use a GitHub repository to host the code if it is too much to fit in a code block (or two).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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