Skip to content

Commit 42fecf5

Browse files
committed
chore: ensure that errors during login are reported to error log
1 parent 0c0787c commit 42fecf5

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

app/api/authentication_api.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,7 @@ class AuthenticationApi < Grape::API
133133
if user.new_record?
134134
user.encrypted_password = BCrypt::Password.create(SecureRandom.hex(32))
135135
unless user.valid?
136+
logger.error "User #{user.username} is invalid: #{user.errors.full_messages.join(', ')}"
136137
error!(error: 'There was an error creating your account. ' \
137138
'Please get in contact with your unit convenor or the ' \
138139
'system administrators.')

0 commit comments

Comments
 (0)