ResultCode Property
The result code returned in the last server response.
Syntax
ldap.getResultCode([callback])
Default Value
0
Callback
The 'callback' parameter specifies a function which will be called when the operation completes (or an error is encountered). If the 'callback' parameter is not specified, then the method will block and will not return until the operation completes (or an error is encountered).
The callback for the getResultCode([callback]) method is defined as:
function(err, data){ }
'err' is the error that occurred. If there was no error, then 'err' is 'null'.
'data' is the value returned by the method.
The callback for the setResultCode([callback]) method is defined as:
function(err){ }
'err' is the error that occurred. If there was no error, then 'err' is 'null'.
'err' has 2 properties which hold detailed information:
err.code err.message
Remarks
This property contains the result code returned in the last server response. This is identical to the corresponding parameter provided by the last Result, SearchResult, or SearchComplete event.
Possible result codes are:
0 | success |
1 | operationsError |
2 | protocolError |
3 | timeLimitExceeded |
4 | sizeLimitExceeded |
5 | compareFalse |
6 | compareTrue |
7 | authMethodNotSupported |
8 | strongAuthRequired |
9 | reserved |
10 | referral |
11 | adminLimitExceeded |
12 | unavailableCriticalExtension |
13 | confidentialityRequired |
14 | saslBindInProgress |
16 | noSuchAttribute |
17 | undefinedAttributeType |
18 | inappropriateMatching |
19 | constraintViolation |
20 | attributeOrValueExists |
21 | invalidAttributeSyntax |
32 | noSuchObject |
33 | aliasProblem |
34 | invalidDNSyntax |
35 | reserved for undefined isLeaf |
36 | aliasDereferencingProblem |
48 | inappropriateAuthentication |
49 | invalidCredentials |
50 | insufficientAccessRights |
51 | busy |
52 | unavailable |
53 | unwillingToPerform |
54 | loopDetect |
64 | namingViolation |
65 | objectClassViolation |
66 | notAllowedOnNonLeaf |
67 | notAllowedOnRDN |
68 | entryAlreadyExists |
69 | objectClassModsProhibited |
70 | reserved for CLDAP |
71 | affectsMultipleDSAs |
All the result codes with the exception of success, compareFalse and compareTrue are to be treated as meaning the operation could not be completed in its entirety. Result codes from 16 to 21 indicate an AttributeProblem, codes 32, 33, 34 and 36 indicate a NameProblem, codes 48, 49 and 50 indicate a SecurityProblem, codes 51 to 54 indicate a ServiceProblem, and codes 64 to 69 and 71 indicate an UpdateProblem.
This property is read-only.
Data Type
Integer