lib/goliath/rack/validator.rb in goliath-1.0.4 vs lib/goliath/rack/validator.rb in goliath-1.0.5
- old
+ new
@@ -37,10 +37,10 @@
#
def safely(env, headers={})
begin
yield
rescue Goliath::Validation::Error => e
- validation_error(e.status_code, e.message, headers)
+ validation_error(e.status_code, e.message, e.headers.merge(headers))
rescue Exception => e
env.logger.error(e.message)
env.logger.error(e.backtrace.join("\n"))
validation_error(500, e.message, headers)
end