entitlements-github-plugin 1.2.5 → 1.2.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7866f5cc065f837d70b4a18815f786f9ce5ce0cf24e22330f48db4fadb2bfb8d
4
- data.tar.gz: e09e3c17719fb411cc96326370f2a9cbbe4cdaa87fa6a94329deab2081379b1a
3
+ metadata.gz: e8b4641323dd4da38ecb87c7f94eacecdfc20508dfdeb0e1b02030c31fe67ab7
4
+ data.tar.gz: c9180370314b8e80b776ecc554fba1310cc690a246ddc1ac99509263dbb01547
5
5
  SHA512:
6
- metadata.gz: c690243acde1d9ee347a14ea5fb205bf5e54bbc51dd6cf02c6670aa9fee3f6dd325eb94b069a752e9d0690c06f80b1599d1fd24a227f5f58faaaff381d142a4b
7
- data.tar.gz: c91f6a53cc2389628839edf45f8994c81f20919d4a88b5a3ae6f8946142f0708d6e8f8f24120df8f98f01d3011ca51548d3cad46246cfd8e0ea8c7387dda5f6f
6
+ metadata.gz: a0311bcc81ebeac4a1ea1852962bf5a7b592771e2ed11ab1955e199bf5d935d5117e7632167d6bcda55d6b979167faa1cba79744282e55957e011975816b8417
7
+ data.tar.gz: 6de304801162205be96002493fedff35431cc37823fdc0b6f80933731fd89ae7ce15cf820be1a8e82dbb77a607e50a0900cba9604872566fac8b829d01c58fc2
@@ -392,23 +392,29 @@ module Entitlements
392
392
  return { code: response.code.to_i, data: { "body" => response.body } }
393
393
  end
394
394
 
395
- begin
396
- data = JSON.parse(response.body)
397
- if data.key?("errors")
398
- # Synthesized 500 below triggers a retry, so log at WARN. Note: some GraphQL
399
- # `errors` are permanent (bad query, auth, schema). The retry wrapper's final
400
- # "Giving up" ERROR will surface persistent cases.
401
- Entitlements.logger.warn "Errors reported: #{data['errors'].inspect}"
402
- return { code: 500, data: }
403
- end
404
- { code: response.code.to_i, data: }
405
- rescue JSON::ParserError => e
406
- # JSON parse errors mean the API returned something we can't interpret. The
407
- # synthesized 500 below triggers a retry, but the cause is more likely a real
408
- # protocol/server problem than a transient network blip, so log at ERROR.
409
- Entitlements.logger.error "#{e.class} #{e.message}: #{response.body.inspect}"
410
- { code: 500, data: { "body" => response.body } }
395
+ data = JSON.parse(response.body)
396
+ if data.key?("errors")
397
+ # Synthesized 500 below triggers a retry, so log at WARN. Note: some GraphQL
398
+ # `errors` are permanent (bad query, auth, schema). The retry wrapper's final
399
+ # "Giving up" ERROR will surface persistent cases.
400
+ Entitlements.logger.warn "Errors reported: #{data['errors'].inspect}"
401
+ return { code: 500, data: }
411
402
  end
403
+
404
+ { code: response.code.to_i, data: }
405
+
406
+ rescue Net::ReadTimeout => e
407
+ # Defend against network blips, those can be safely retried via the
408
+ # synthesized 500 below, so log at WARN.
409
+ reset_graphql_http
410
+ Entitlements.logger.warn "#{e.class} #{e.message}"
411
+ { code: 500, data: nil }
412
+ rescue JSON::ParserError => e
413
+ # JSON parse errors mean the API returned something we can't interpret. The
414
+ # synthesized 500 below triggers a retry, but the cause is more likely a real
415
+ # protocol/server problem than a transient network blip, so log at ERROR.
416
+ Entitlements.logger.error "#{e.class} #{e.message}: #{response.body.inspect}"
417
+ { code: 500, data: { "body" => response.body } }
412
418
  rescue => e
413
419
  # Catch-all for any unexpected exception (network blip OR local code bug).
414
420
  # We retry below via the synthesized 500, but log at ERROR because this
data/lib/version.rb CHANGED
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Entitlements
4
4
  module Version
5
- VERSION = "1.2.5"
5
+ VERSION = "1.2.6"
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: entitlements-github-plugin
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.5
4
+ version: 1.2.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - GitHub, Inc. Security Ops
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2026-09-14 00:00:00.000000000 Z
11
+ date: 2026-10-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: contracts