lib/intercom/request.rb in intercom-3.5.19 vs lib/intercom/request.rb in intercom-3.5.20
- old
+ new
@@ -98,10 +98,10 @@
begin
parsed_body = JSON.parse(decoded_body)
rescue JSON::ParserError => _
raise_errors_on_failure(response)
end
- raise_application_errors_on_failure(parsed_body, response.code.to_i) if parsed_body['type'] == 'error.list'
+ raise_application_errors_on_failure(parsed_body, response.code.to_i) if parsed_body&['type'] == 'error.list'
parsed_body
end
def set_rate_limit_details(response)
rate_limit_details = {}