diff options
author | Drew Blessing <drew@gitlab.com> | 2016-11-30 11:23:04 -0600 |
---|---|---|
committer | Drew Blessing <drew@gitlab.com> | 2016-11-30 11:23:04 -0600 |
commit | 374033fe26013c685157ac0a3cd2a2b40f992ef5 (patch) | |
tree | dabdf308491c0e52b93b53e51706ab5723a3ee31 | |
parent | d48787a23370056770b634785a4185ed2a4fbadd (diff) | |
download | gitlab-ce-374033fe26013c685157ac0a3cd2a2b40f992ef5.tar.gz |
Improve the `Gitlab::OAuth::User` error message
The error saving the user is logged to application.log. Previously,
the entry had no context and was unusable - 'Error saving user:
[Email address already taken]'. Adding the auth hash UID and email
makes the error more helpful.
-rw-r--r-- | lib/gitlab/o_auth/user.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/gitlab/o_auth/user.rb b/lib/gitlab/o_auth/user.rb index a8b4dc2a83f..96ed20af918 100644 --- a/lib/gitlab/o_auth/user.rb +++ b/lib/gitlab/o_auth/user.rb @@ -39,7 +39,7 @@ module Gitlab log.info "(#{provider}) saving user #{auth_hash.email} from login with extern_uid => #{auth_hash.uid}" gl_user rescue ActiveRecord::RecordInvalid => e - log.info "(#{provider}) Error saving user: #{gl_user.errors.full_messages}" + log.info "(#{provider}) Error saving user #{auth_hash.uid} (#{auth_hash.email}): #{gl_user.errors.full_messages}" return self, e.record.errors end |