From e409fabf8d02ec64f755f144ec815c80e576b618 Mon Sep 17 00:00:00 2001 From: Blake Erickson Date: Thu, 25 Jan 2024 12:18:16 -0700 Subject: [PATCH] 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. --- app/jobs/regular/export_csv_file.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/jobs/regular/export_csv_file.rb b/app/jobs/regular/export_csv_file.rb index e37e97e2002..14991742f2c 100644 --- a/app/jobs/regular/export_csv_file.rb +++ b/app/jobs/regular/export_csv_file.rb @@ -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