lib/boxcars/boxcar.rb in boxcars-0.6.4 vs lib/boxcars/boxcar.rb in boxcars-0.6.5
- old
+ new
@@ -164,10 +164,10 @@
output = nil
begin
output = call(inputs: inputs)
rescue StandardError => e
Boxcars.error "Error in #{name} boxcar#call: #{e}\nbt:#{e.backtrace[0..5].join("\n ")}", :red
- Boxcars.error("Response Body: #{e.response[:body]}", :red) if e.respond_to?(:response)
+ Boxcars.error("Response Body: #{e.response[:body]}", :red) if e.respond_to?(:response) && e.response.present?
raise e
end
validate_outputs(outputs: output.keys)
return output if return_only_outputs