diff options
author | Rémy Coutable <remy@rymai.me> | 2016-12-01 10:07:55 +0000 |
---|---|---|
committer | Rémy Coutable <remy@rymai.me> | 2016-12-01 10:07:55 +0000 |
commit | c2be86b50f50d7bd5ec36b2893aa20d85dc3d21c (patch) | |
tree | c61e54a1a7000086116b38a2ec18f9346748ee12 | |
parent | bbcce5f7dcbc498bb82851f07be6d9a41578ea28 (diff) | |
parent | 374033fe26013c685157ac0a3cd2a2b40f992ef5 (diff) | |
download | gitlab-ce-c2be86b50f50d7bd5ec36b2893aa20d85dc3d21c.tar.gz |
Merge branch 'improve_oauth_user_error' into 'master'
Improve the `Gitlab::OAuth::User` error message
## What does this MR do?
Fixes a logging issue submitted by a customer at https://gitlab.zendesk.com/agent/tickets/50728.
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.
For such a small logging change, do we need a changelog entry?
See merge request !7851
-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 |