Skip to content

Commit dbe0341

Browse files
committed
Add more ENV keys for debugging.
1 parent 89bc970 commit dbe0341

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

lib/utopia/exceptions/mailer.rb

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,21 @@ def call(env)
6666
:user_agent,
6767
]
6868

69+
ENV_KEYS = [
70+
"PATH_INFO",
71+
"REQUEST_METHOD",
72+
"REQUEST_PATH",
73+
"REQUEST_URI",
74+
"SCRIPT_NAME",
75+
"QUERY_STRING",
76+
"SERVER_PROTOCOL",
77+
"SERVER_NAME",
78+
"SERVER_PORT",
79+
"REMOTE_ADDR",
80+
"CONTENT_TYPE",
81+
"CONTENT_LENGTH",
82+
]
83+
6984
def generate_backtrace(io, exception, prefix: "Exception")
7085
io.puts "#{prefix} #{exception.class.name}: #{exception.to_s}"
7186

@@ -104,6 +119,13 @@ def generate_body(exception, env)
104119

105120
io.puts
106121

122+
ENV_KEYS.each do |key|
123+
value = env[key]
124+
io.puts "env[#{key.inspect}]: #{value.inspect}"
125+
end
126+
127+
io.puts
128+
107129
env.select{|key,_| key.start_with? "HTTP_"}.each do |key, value|
108130
io.puts "#{key}: #{value.inspect}"
109131
end

0 commit comments

Comments
 (0)