DEV: Log any errors for the user csv export (#25422)

Currently when exporting a list of users and there is an error we just
log that there was an error, but we don't show what the issue is in the
logs which makes it really hard to debug in production. This change will
output any errors to the logs.
This commit is contained in:
Blake Erickson 2024-01-25 12:18:16 -07:00 committed by GitHub
parent ae5c11f364
commit e409fabf8d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -103,7 +103,9 @@ module Jobs
if upload.persisted?
user_export.update_columns(upload_id: upload.id)
else
Rails.logger.warn("Failed to upload the file #{zip_filename}")
Rails.logger.warn(
"Failed to upload the file #{zip_filename}: #{upload.errors.full_messages}",
)
end
end