From 6026c4d9d02ce76eb7153a872efb58502c6c8e55 Mon Sep 17 00:00:00 2001 From: Devin Gaffney Date: Thu, 21 Sep 2023 21:10:57 -0700 Subject: [PATCH] resolve error in returned value of request_api --- app/models/bot/alegre.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/app/models/bot/alegre.rb b/app/models/bot/alegre.rb index 53a9b087b6..e42afbfc9a 100644 --- a/app/models/bot/alegre.rb +++ b/app/models/bot/alegre.rb @@ -502,6 +502,7 @@ def self.request_api(method, path, params = {}, query_or_body = 'body', retries redis_response = redis.blpop(parsed_response.dig("body", "id"), timeout=120) return JSON.parse(redis_response[1]) end + parsed_response rescue StandardError => e if retries > 0 sleep 1