DEV: Improve error message for posts:missing_uploads during S3 migration

DEV: Improve error message for posts:missing_uploads during S3 migration

diff --git a/lib/tasks/uploads.rake b/lib/tasks/uploads.rake
index 3568ebb..bab68b1 100644
--- a/lib/tasks/uploads.rake
+++ b/lib/tasks/uploads.rake
@@ -228,7 +228,7 @@ def migration_successful?(db, should_raise = false)
 
   Rake::Task['posts:missing_uploads'].invoke
   count = PostCustomField.where(name: Post::MISSING_UPLOADS).count
-  raise failure_message if count > 0 && should_raise
+  raise "rake posts:missing_uploads identified #{count} issues. #{failure_message}" if count > 0 && should_raise
   return false if count > 0
 
   return true

GitHub sha: a15cca9a

1 Like