@@ -76,7 +76,9 @@ def self.create(config:, endpoints:, log:)
76
76
"REMOTE_ADDR" => request . env [ "REMOTE_ADDR" ] ,
77
77
"hooks.request_id" => request_id ,
78
78
"hooks.handler" => handler_class_name ,
79
- "hooks.endpoint_config" => endpoint_config
79
+ "hooks.endpoint_config" => endpoint_config ,
80
+ "hooks.start_time" => start_time . iso8601 ,
81
+ "hooks.full_path" => full_path
80
82
}
81
83
82
84
# Add HTTP headers to environment
@@ -113,20 +115,20 @@ def self.create(config:, endpoints:, log:)
113
115
plugin . on_response ( rack_env , response )
114
116
end
115
117
116
- log . info "request processed successfully by handler: #{ handler_class_name } "
117
- log . debug "request duration: #{ Time . now - start_time } s"
118
+ log . info ( "successfully processed webhook event with handler: #{ handler_class_name } ")
119
+ log . debug ( "processing duration: #{ Time . now - start_time } s")
118
120
status 200
119
121
content_type "application/json"
120
122
response . to_json
121
- rescue => e
123
+ rescue StandardError => e
122
124
# Call lifecycle hooks: on_error
123
125
if defined? ( rack_env )
124
126
Core ::PluginLoader . lifecycle_plugins . each do |plugin |
125
127
plugin . on_error ( e , rack_env )
126
128
end
127
129
end
128
130
129
- log . error "request failed: #{ e . message } "
131
+ log . error ( "an error occuring during the processing of a webhook event - #{ e . message } ")
130
132
error_response = {
131
133
error : e . message ,
132
134
code : determine_error_code ( e ) ,
0 commit comments