diff options
author | Saku Ytti <saku@ytti.fi> | 2017-02-13 00:16:53 +0200 |
---|---|---|
committer | Saku Ytti <saku@ytti.fi> | 2017-02-13 00:16:53 +0200 |
commit | 3d3a308faae69572ac17fd6c44ac726d0a958cf9 (patch) | |
tree | fbc9ab48eea893dc1ffec5eedeb5905933d67e8f /lib | |
parent | ddbfedc97c5add661286d0f12c4ac98275dbeb82 (diff) |
don't fail on poor json location specification
Diffstat (limited to 'lib')
-rw-r--r-- | lib/oxidized/source/http.rb | 4 |
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 |