globus_client 0.12.0 → 0.12.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/globus_client/endpoint.rb +2 -1
- data/lib/globus_client/unexpected_response.rb +3 -3
- data/lib/globus_client/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 65d27626412e2eff8ff6514be3ece81fd5f27e471137fcfd8409e51cd6e0f105
|
4
|
+
data.tar.gz: 321b1d89734daacb8ad54487836a68f1fdf1af931fad426d72ec35bc2f355ec8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a4ce82aac85e8c00df5310cdb3b4f821cd1415ee0d525938562b20d97c86f330707691a8ee69dcbfeee53d0e20064f78fd902678d5aa4a0113cc7ce38f209c9a
|
7
|
+
data.tar.gz: 75888830f1b0660f78d551eb3fd2a323f40fb21e5ac9a361c0f8ea22be0b32a11a014dd42719e4b25c33f5f497e2d1b6b296c8db15f5dc89abaed5d4f03ff5e1
|
data/Gemfile.lock
CHANGED
@@ -199,7 +199,8 @@ class GlobusClient
|
|
199
199
|
|
200
200
|
# debugging of Globus responses
|
201
201
|
response_body = JSON.parse(response.body)
|
202
|
-
|
202
|
+
|
203
|
+
UnexpectedResponse.call(response, message: "Response is missing DATA in: #{response_body}") unless response.success? && response_body.key?("DATA")
|
203
204
|
|
204
205
|
JSON
|
205
206
|
.parse(response.body)["DATA"]
|
@@ -26,7 +26,7 @@ class GlobusClient
|
|
26
26
|
# https://docs.globus.org/api/transfer/file_operations/#errors
|
27
27
|
# https://docs.globus.org/api/transfer/acl/#common_errors
|
28
28
|
# https://docs.globus.org/api/auth/reference/
|
29
|
-
def self.call(response)
|
29
|
+
def self.call(response, message: "")
|
30
30
|
case response.status
|
31
31
|
when 400
|
32
32
|
raise BadRequestError, "Invalid path or another error with the request: #{response.body}"
|
@@ -37,11 +37,11 @@ class GlobusClient
|
|
37
37
|
when 404
|
38
38
|
raise ResourceNotFound, "Endpoint ID not found or resource does not exist: #{response.body}"
|
39
39
|
when 502
|
40
|
-
raise EndpointError, "Other error with endpoint: #{response.body}"
|
40
|
+
raise EndpointError, "Other error with endpoint: #{response.status} #{response.body}. #{message}"
|
41
41
|
when 503
|
42
42
|
raise ServiceUnavailable, "The service is down for maintenance."
|
43
43
|
else
|
44
|
-
raise StandardError, "Unexpected response: #{response.status} #{response.body}"
|
44
|
+
raise StandardError, "Unexpected response: #{response.status} #{response.body}. #{message}"
|
45
45
|
end
|
46
46
|
end
|
47
47
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: globus_client
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.12.
|
4
|
+
version: 0.12.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Aaron Collier
|
@@ -208,7 +208,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
208
208
|
- !ruby/object:Gem::Version
|
209
209
|
version: '0'
|
210
210
|
requirements: []
|
211
|
-
rubygems_version: 3.4.
|
211
|
+
rubygems_version: 3.4.13
|
212
212
|
signing_key:
|
213
213
|
specification_version: 4
|
214
214
|
summary: Interface for interacting with the Globus API.
|