sentry_top_errors 0.1.3 → 0.1.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 4b815358cb7c0ff813d5f8413c20baf96fcf92c882e1c8f67cb20edf7b6c631c
4
- data.tar.gz: 6eaf8ebaf3dd48334db7250d86d823c7adccc52e664d2dad3a65bc0aedac67d8
3
+ metadata.gz: 017aaf67e975307e6723dc0e0989e1aec7275cfdfdec7759a6c175f50d7c9f31
4
+ data.tar.gz: 0147ccc8ff0eb09478ebe3b689bf9ae799941eff9c6f71005f7d7b50f81cd788
5
5
  SHA512:
6
- metadata.gz: 833a13244399e4308619fcb852bd50b98c03d459381ee0ea2eaec71a91e6519db5f5bdc9bf7553a6e0967ae1334b8b7a8c3de1babafc5d24d0e3a729a6be7947
7
- data.tar.gz: 3ed0dd57a38729c9286297b08a741af9d90990e49d4b18506d38818fbd909ace63e0b4671078fd7c69a1edef4e89a45d196b606f9d14baa6560c9ecc54bd81e7
6
+ metadata.gz: fe9aa97a6f56039cce05c72db603fdd10d046194a3d1478a544d8bb922812614ac31c6e95e72aada148b2d7f2bf0dda4888873acfee685b051164423e85ff45e
7
+ data.tar.gz: 911f1c7fb17ef9d8071f30cd641ee3b1b3da09fe7f74fc6650cba1edd79d88423ccc35af8103b92dbfe7eb4d8eb1336e0aef6d90fc735652f0c2bcd73230bf18
@@ -13,12 +13,18 @@ class SentryTopErrors::SentryClient
13
13
  @enable_cache = enable_cache
14
14
  end
15
15
 
16
- def http(method, path, options = {})
16
+ def http(method, path, options = {}, retry_count = 0)
17
17
  @conn ||= Excon.new(SENTRY_HOST, HTTP_OPTIONNS)
18
18
  options[:headers] ||= {}
19
19
  options[:headers]['Authorization'] ||= "Bearer #{@sentry_key}"
20
20
  response = @conn.request({method: method, path: path}.merge(options))
21
21
 
22
+ # status 429 = too many requests
23
+ if response.status == 429 && retry_count < 4
24
+ sleep(0.2)
25
+ return http(method, path, options, retry_count + 1)
26
+ end
27
+
22
28
  SentryTopErrors::ApiResponse.new_from_res(response)
23
29
  end
24
30
 
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = "sentry_top_errors"
3
- s.version = "0.1.3"
3
+ s.version = "0.1.4"
4
4
  s.summary = "Generate top errors report for sentry"
5
5
  s.description = ""
6
6
  s.author = "Pavel Evstigneev"
data/templates/index.html CHANGED
@@ -334,7 +334,7 @@
334
334
  <script>
335
335
  var generateRow = (issue, table) => {
336
336
  var tr = $.element('tr', {
337
- appendTo: issuesTable,
337
+ appendTo: table,
338
338
  class: issue.is_production ? 'is-prod-issue' : 'is-non-prod-issue',
339
339
  });
340
340
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sentry_top_errors
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Pavel Evstigneev