DEV: Log env on error when looking up user in message_bus. (#13208)

DEV: Log env on error when looking up user in message_bus. (#13208)

This will provide more information about the request and make the error debuggable.

diff --git a/config/initializers/004-message_bus.rb b/config/initializers/004-message_bus.rb
index a566d46..2acc0e5 100644
--- a/config/initializers/004-message_bus.rb
+++ b/config/initializers/004-message_bus.rb
@@ -42,8 +42,9 @@ def setup_message_bus_env(env)
         extra_headers['Set-Cookie'] = '_t=del; path=/; expires=Thu, 01 Jan 1970 00:00:00 GMT'
       end
     rescue => e
-      Discourse.warn_exception(e, message: "Unexpected error in Message Bus")
+      Discourse.warn_exception(e, message: "Unexpected error in Message Bus", env: env)
     end
+
     user_id = user && user.id
 
     raise Discourse::InvalidAccess if !user_id && SiteSetting.login_required

GitHub sha: 62399ca3

This commit appears in #13208 which was approved by CvX. It was merged by SamSaffron.