Skip to content

Commit 5e5cc53

Browse files
committed
add descriptive error
1 parent 6a27fa3 commit 5e5cc53

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/intercom/request.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,8 +75,8 @@ def execute(target_base_url=nil, username:, secret: nil)
7575
rescue Intercom::RateLimitExceeded => e
7676
if @handle_rate_limit
7777
seconds_to_retry = (@rate_limit_details[:reset_at] - Time.now.utc).ceil
78-
if (retries-=1) < 0
79-
raise Intercom::RateLimitExceeded.new('armbar from the back')
78+
if (retries -= 1) < 0
79+
raise Intercom::RateLimitExceeded.new('Rate limit retries exceeded. Please examine current API Usage.')
8080
else
8181
sleep seconds_to_retry unless seconds_to_retry < 0
8282
retry

0 commit comments

Comments
 (0)