Change LDAPServerConnectionError

The base class of LDAPServerConnectionError is changed from Error to
UnexpectedError so that it will result in HTTP 500 instead of 504. It
is inappropriate to be telling API users that there was a timeout,
which implies that LDAP is being used when they should not know that.

Change-Id: Ic9ac3443bb2117e33b1ec66d570ae2a7a2f62df2
Closes-Bug: #1687115
This commit is contained in:
rocky 2017-05-09 17:21:23 +08:00 committed by Matthew Edmonds
parent ab2928f2cd
commit 6ae168544a
1 changed files with 3 additions and 5 deletions

View File

@ -594,8 +594,6 @@ class CredentialEncryptionError(Exception):
"from accessing encrypted credentials.")
class LDAPServerConnectionError(Error):
message_format = _('Timed out waiting to establish a '
'connection to the LDAP Server (%(url)s).')
code = 504
title = 'Gateway Timeout'
class LDAPServerConnectionError(UnexpectedError):
debug_message_format = _('Unable to establish a connection to '
'LDAP Server (%(url)s).')