add exception handling for failed popular search service calls

This commit is contained in:
Albert Yi
2018-09-04 13:44:27 -07:00
parent a5943de418
commit 13c2b4f5d0

View File

@@ -37,5 +37,10 @@ class PopularSearchService
end
response
end.to_s.force_encoding("utf-8")
rescue => e
Rails.logger.error(e.to_s)
NewRelic::Agent.notice_error(e)
return []
end
end