diff --git a/lib/authenticom_rpa.rb b/lib/authenticom_rpa.rb index 6a071d1..3bfc1e0 100644 --- a/lib/authenticom_rpa.rb +++ b/lib/authenticom_rpa.rb @@ -35,7 +35,11 @@ def lookup(phone_number, options = {}) } ) - response.body[:find_info3_response][:find_info3_result][:match] + if response.body[:find_info3_response] && response.body[:find_info3_response][:find_info3_result] && response.body[:find_info3_response][:find_info3_result][:match] + response.body[:find_info3_response][:find_info3_result][:match] + else + nil + end end end end