summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSaku Ytti <saku@ytti.fi>2017-02-13 00:16:53 +0200
committerSaku Ytti <saku@ytti.fi>2017-02-13 00:16:53 +0200
commit3d3a308faae69572ac17fd6c44ac726d0a958cf9 (patch)
treefbc9ab48eea893dc1ffec5eedeb5905933d67e8f
parentddbfedc97c5add661286d0f12c4ac98275dbeb82 (diff)
don't fail on poor json location specification
-rw-r--r--lib/oxidized/source/http.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/oxidized/source/http.rb b/lib/oxidized/source/http.rb
index 48ee8a4..7186f98 100644
--- a/lib/oxidized/source/http.rb
+++ b/lib/oxidized/source/http.rb
@@ -69,8 +69,8 @@ if RUBY_VERSION < '2.3'
value
elsif value.respond_to?(:dig)
value.dig(*rest)
- else
- fail TypeError, "#{value.class} does not have #dig method"
+ else # foo.bar.baz (bar exist but is not hash)
+ return nil
end
end
end