vpndetection 5.6.0 → 5.6.1
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 +4 -4
- data/lib/vpndetection/transport.rb +18 -0
- data/lib/vpndetection/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 2ddd3e08956d257b2c9353d142b457507430d3860186944590ba33d8fceb6a4c
|
|
4
|
+
data.tar.gz: 7f6b46235143840482d985e57082edf652a162b64fda0c42b2451d6509cc9135
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 726ee5b34167a8fb156138f08f4a61f26eae8769dd407aaddc1321547f3872055afd5e87d6925df07cbdc0ad69182fcd2010a0c0297fa61eeadfd92c21680483
|
|
7
|
+
data.tar.gz: f6efe75d0ed1345d81bbc2e88bcf0ef7167e48dfeacad2e29f494ced3ff7517b1c0f128b71cb9a004dd43c9719508d2de8c3e933db30b492d7834ea9f7be52aa
|
|
@@ -80,6 +80,24 @@ module VPNDetection
|
|
|
80
80
|
request
|
|
81
81
|
end
|
|
82
82
|
|
|
83
|
+
# A 2xx the generated client cannot read as the answer it promises is the
|
|
84
|
+
# server's fault, and a retryable :server_error, as it is on the OAuth calls:
|
|
85
|
+
# a proxy's HTML page, a cut-off or empty body, or an object missing a member
|
|
86
|
+
# the spec requires. The generated reader raised a RuntimeError, a
|
|
87
|
+
# JSON::ParserError or an ArgumentError for those, none of them retried, and
|
|
88
|
+
# handed an empty or non-object body back as nil, as if it were the answer.
|
|
89
|
+
def deserialize(response, return_type)
|
|
90
|
+
data = super
|
|
91
|
+
return data unless data.nil?
|
|
92
|
+
|
|
93
|
+
raise Error.new(:server_error, "the API answered with no #{return_type}", status: response.code)
|
|
94
|
+
rescue Error
|
|
95
|
+
raise
|
|
96
|
+
rescue StandardError => e
|
|
97
|
+
raise Error.new(:server_error, "could not read the answer as #{return_type}: #{e.message}",
|
|
98
|
+
status: response.code)
|
|
99
|
+
end
|
|
100
|
+
|
|
83
101
|
# A GET for the presigned link the download endpoint hands out.
|
|
84
102
|
#
|
|
85
103
|
# Built here rather than through {#build_request} so it carries NO
|
data/lib/vpndetection/version.rb
CHANGED