Skip to content
Connect2id

LdapAuth error codes

When LdapAuth cannot process a JSON-RPC 2.0 request, it returns an error object containing a numeric code and a short message.

Code range Category
-2099 to -2000 User authentication, attribute retrieval and backend errors
-31199 to -31100 Client access errors
-32768 to -32000 Codes reserved by JSON-RPC 2.0 for protocol and server errors

For example, an invalid username or password supplied to user.authGet produces this response:

{
  "error": {
    "code": -2000,
    "message": "Bad username/password"
  },
  "id": "0001",
  "jsonrpc": "2.0"
}

The JSON-RPC 2.0 specification defines the error response format. For more information about a failure, inspect the LdapAuth log with INFO-level logging enabled. Details of backend exceptions can also be included in responses through the exception reporting setting.

User authentication and backend errors

Code Message
-2000 Bad username/password
-2010 “user.auth” requests denied
-2011 “user.authGet” requests denied
-2012 “user.get” requests denied
-2013 “user.resolveDN” requests denied
-2020 Json2Ldap/LDAP connection retrieval denied
-2030 Json2Ldap/LDAP connection retrieval not supported by backend
-2031 User DN resolution not supported/configured
-2032 User attributes retrieval not supported/configured
-2033 Directory connector stats not supported
-2040 LDAP/Json2Ldap backend service exception

Client access errors

These errors indicate that a request was denied by an LdapAuth access rule.

Code Message
-31100 Requests must be sent over HTTPS
-31105 Client IP address denied access
-31110 Trusted client X.509 certificate required
-31111 Invalid client X.509 certificate principal DN
-31112 Client X.509 certificate principal denied
-31120 API key filter requires named JSON-RPC 2.0 parameters
-31121 Missing API key
-31123 API key denied access

JSON-RPC 2.0 errors

JSON-RPC 2.0 reserves codes from -32768 through -32000. The following codes identify specific protocol errors; -32099 through -32000 is reserved for server errors.

Code Message
-32700 JSON parse error
-32600 Invalid request
-32601 Method not found
-32602 Invalid parameters
-32603 Internal error