From 733cb11407224115625bea28f51d2cb0623209c4 Mon Sep 17 00:00:00 2001 From: robertburrowes Date: Thu, 29 Aug 2024 13:21:16 +1200 Subject: [PATCH] Return code can be a String. Something that needs to be fixed upstream, but for now, we can deal with this. --- rlib/dropbox.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rlib/dropbox.rb b/rlib/dropbox.rb index b61636a..0befb23 100644 --- a/rlib/dropbox.rb +++ b/rlib/dropbox.rb @@ -40,7 +40,7 @@ def dropbox_query(query:, query_data: '{}', trace: false, retry_count: 0, conten puts JSON.pretty_generate(h) if trace return h rescue WIKK::WebBrowser::Error => e - if e.web_return_code == 429 || e.web_return_code == 500 # Too Many Requests or Bad server in Pool. + if e.web_return_code.to_i == 429 || e.web_return_code.to_i == 500 # Too Many Requests or Bad server in Pool. retry_count += 1 sleep retry_count * 15 if retry_count <= 4