Log LDAP errors and don't swallow unrelated exceptions
What does this MR do?
Log errors when trying to authenticate over LDAP, and don't swallow unrelated exceptions.
Are there points in the code the reviewer needs to double check?
- Previously all exceptions were ignored, now only
Net::LDAP::Error
and exceptions that inherit from it are caught by therescue
clause. There might be other exceptions that should also be ignored / dealt with. - Not sure if the Rails production log is a good choice for this, or if the GitLab application log would be more appropriate.
Why was this MR needed?
To help with troubleshooting LDAP issues, previously if a user login was rejected due to a backend error there was no indication in the logs.
Does this MR meet the acceptance criteria?
-
CHANGELOG entry added -
Documentation created/updated -
API support added - Tests
-
Added for this feature/bug -
All builds are passing
-
-
Conform by the style guides -
Branch has no merge conflicts with master
(if you do - rebase it please) -
Squashed related commits together - I left the CHANGELOG update in its own commit because I saw https://gitlab.com/gitlab-org/gitlab-ce/issues/17826, let me know if you prefer squashing it anyway