the consume liquid tag also rescues Errno::ETIMEDOUT exceptions
did
committed Oct 26, 2016
commit e0b85a37f067851e28624da78baea2920ecc23f4
Showing 2
changed files with
2 additions
and 2 deletions
locomotive/steam/liquid/tags/consume.rb b/lib/locomotive/steam/liquid/tags/consume.rb
+1
-1
| @@ | @@ -72,7 +72,7 @@ module Locomotive |
| Locomotive::Common::Logger.info "[consume] #{@url.inspect} / #{@api_options.inspect}" | |
| context.scopes.last[@name] = service(context).consume(@url, @api_options) | |
| - | rescue Timeout::Error |
| + | rescue Timeout::Error, Errno::ETIMEDOUT |
| context.scopes.last[@name] = last_response(context) | |
| end | |
locomotive/steam/services/external_api_service.rb b/lib/locomotive/steam/services/external_api_service.rb
+1
-1
| @@ | @@ -50,7 +50,7 @@ module Locomotive |
| parsed_response = response.parsed_response | |
| if response.code == 200 | |
| - | HashConverter.to_underscore parsed_response |
| + | HashConverter.to_underscore(parsed_response) |
| else | |
| Locomotive::Common::Logger.error "[WebService] consumed #{path}, #{options.inspect}, response = #{response.inspect}" | |
| nil | |