handavid commented on code in PR #1372:
URL: https://github.com/apache/knox/pull/1372#discussion_r3915708864
##########
gateway-server/src/main/java/org/apache/knox/gateway/services/ldap/interceptor/UserSearchInterceptor.java:
##########
@@ -71,6 +75,7 @@ public Entry lookup(LookupOperationContext ctx) throws
LdapException {
entry = backend.getUser(username, schemaManager);
} catch (Exception e) {
LOG.ldapLookupFailed(ctx.getDn().toString(),e);
+ throw new LdapOperationException(ResultCodeEnum.OTHER,
"Lookup request to backend " + getName() + " failed.", e);
Review Comment:
I picked OTHER because I didn't want to pass the backend code directly. I
think that would be confusing. e.g., if the backend credentials were changed
then passing the backend code would show "invalid credentials" to the caller.
However, this is misleading since it's not something that the caller has
control over since it's part of the proxy configuration. Similarly, it will be
confusing to show the caller "unable to connect" if there's a network problem
between the proxy and the remote backend.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]