From 3d3a308faae69572ac17fd6c44ac726d0a958cf9 Mon Sep 17 00:00:00 2001 From: Saku Ytti Date: Mon, 13 Feb 2017 00:16:53 +0200 Subject: don't fail on poor json location specification --- lib/oxidized/source/http.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/oxidized/source') 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 -- cgit v1.2.1