zendesk_api 1.31.0 → 1.32.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/zendesk_api/error.rb +12 -1
- data/lib/zendesk_api/version.rb +1 -1
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3a9cc4118166019441137ca3a0ddbabd9444b7b32b26ca1f3ed83b9cddb5dea0
|
4
|
+
data.tar.gz: 1fbaf93e103deb403cbcf81cdb031e0461de68ed532ad6abd061d8d7cf6462c8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 51e1b589e97fd42c532ef1225b9c2a0cfeabb6f7560739fad4adde015defc73f3908d4ab2049135ca219d5e210965fc1c6e644914e73ac886fb5b50ad810a7e6
|
7
|
+
data.tar.gz: ef264143b1c4236505bff73e11d846ea4eb6bb27721bc848b6031e641c031f9827d9e32546ba2480bbddd8cf86f84bc6a62e0ff802e3157546d0b0a6c3c9f792
|
data/lib/zendesk_api/error.rb
CHANGED
@@ -20,7 +20,7 @@ module ZendeskAPI
|
|
20
20
|
super
|
21
21
|
|
22
22
|
if response[:body].is_a?(Hash)
|
23
|
-
@errors = response[:body]["details"] || response[:body]
|
23
|
+
@errors = response[:body]["details"] || generate_error_msg(response[:body])
|
24
24
|
end
|
25
25
|
|
26
26
|
@errors ||= {}
|
@@ -29,6 +29,17 @@ module ZendeskAPI
|
|
29
29
|
def to_s
|
30
30
|
"#{self.class.name}: #{@errors}"
|
31
31
|
end
|
32
|
+
|
33
|
+
private
|
34
|
+
|
35
|
+
def generate_error_msg(response_body)
|
36
|
+
return unless response_body["description"] || response_body["message"]
|
37
|
+
|
38
|
+
[
|
39
|
+
response_body["description"],
|
40
|
+
response_body["message"]
|
41
|
+
].compact.join(" - ")
|
42
|
+
end
|
32
43
|
end
|
33
44
|
|
34
45
|
class NetworkError < ClientError; end
|
data/lib/zendesk_api/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: zendesk_api
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.32.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Steven Davidovitz
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2021-
|
12
|
+
date: 2021-08-02 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: faraday
|
@@ -143,9 +143,9 @@ licenses:
|
|
143
143
|
- Apache-2.0
|
144
144
|
metadata:
|
145
145
|
bug_tracker_uri: https://github.com/zendesk/zendesk_api_client_rb/issues
|
146
|
-
changelog_uri: https://github.com/zendesk/zendesk_api_client_rb/blob/v1.
|
147
|
-
documentation_uri: https://www.rubydoc.info/gems/zendesk_api/1.
|
148
|
-
source_code_uri: https://github.com/zendesk/zendesk_api_client_rb/tree/v1.
|
146
|
+
changelog_uri: https://github.com/zendesk/zendesk_api_client_rb/blob/v1.32.0/CHANGELOG.md
|
147
|
+
documentation_uri: https://www.rubydoc.info/gems/zendesk_api/1.32.0
|
148
|
+
source_code_uri: https://github.com/zendesk/zendesk_api_client_rb/tree/v1.32.0
|
149
149
|
wiki_uri: https://github.com/zendesk/zendesk_api_client_rb/wiki
|
150
150
|
post_install_message:
|
151
151
|
rdoc_options: []
|