feat: return nil always

This commit is contained in:
Shivam Mishra
2024-08-22 18:21:16 +05:30
parent 873e5f201e
commit 7c19485c8f
+4 -1
View File
@@ -50,7 +50,10 @@ class Integrations::OpenaiBaseService
JSON.parse(value, symbolize_names: true)
rescue JSON::ParserError
value
# If json parse failed, returning the value as is will fail too
# since we access the keys as symbols down the line
# So it's best to return nil
nil
end
def save_to_cache(response)