lib/ding_sdk/lookup.rb in ding_sdk-0.8.19 vs lib/ding_sdk/lookup.rb in ding_sdk-0.8.20

- old
+ new

@@ -19,11 +19,11 @@ end sig { params(customer_uuid: ::String, phone_number: ::String).returns(::DingSDK::Operations::LookupResponse) } def lookup(customer_uuid, phone_number) - # lookup - Perform a phone number lookup + # lookup - Look up for phone number request = ::DingSDK::Operations::LookupRequest.new( customer_uuid: customer_uuid, phone_number: phone_number ) @@ -52,10 +52,11 @@ if r.status == 200 if Utils.match_content_type(content_type, 'application/json') out = Utils.unmarshal_complex(r.env.response_body, ::DingSDK::Shared::LookupResponse) res.lookup_response = out end - elsif r.status == 400 + else + if Utils.match_content_type(content_type, 'application/json') out = Utils.unmarshal_complex(r.env.response_body, ::DingSDK::Shared::ErrorResponse) res.error_response = out end end