lib/boxcars/boxcar.rb in boxcars-0.5.1 vs lib/boxcars/boxcar.rb in boxcars-0.6.1
- old
+ new
@@ -163,10 +163,11 @@
inputs = our_inputs(inputs)
output = nil
begin
output = call(inputs: inputs)
rescue StandardError => e
- Boxcars.error "Error in #{name} boxcar#call: #{e}\nbt:#{caller[0..5].join("\n ")}", :red
+ 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)
raise e
end
validate_outputs(outputs: output.keys)
return output if return_only_outputs