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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5effe63f9bf20a2f1609678307075c1469cb10bf73ddf992bac282fe0373643e
4
- data.tar.gz: 528b5448a9add09ae4f14dac496dff8753ea6ea80e991f5610d021ec70fa27de
3
+ metadata.gz: 3a9cc4118166019441137ca3a0ddbabd9444b7b32b26ca1f3ed83b9cddb5dea0
4
+ data.tar.gz: 1fbaf93e103deb403cbcf81cdb031e0461de68ed532ad6abd061d8d7cf6462c8
5
5
  SHA512:
6
- metadata.gz: e8897e7999a22d4c0785696fcfd59310035eb4f654cbbbfbde1b0f4be72defe5a106bf4489c1bef71b4638cfc8d04f0d6866503f47c928c4c9ed7275aa14b77a
7
- data.tar.gz: 1a8c38c9297aa2220b9d46909be86bcc2de2572bc11b43a4fa56a4f7ff7bed1516af0eda2a0040fb3e4d8ad8b50c3a8929b420e5dcd7b833c1f4893f44eeb0f1
6
+ metadata.gz: 51e1b589e97fd42c532ef1225b9c2a0cfeabb6f7560739fad4adde015defc73f3908d4ab2049135ca219d5e210965fc1c6e644914e73ac886fb5b50ad810a7e6
7
+ data.tar.gz: ef264143b1c4236505bff73e11d846ea4eb6bb27721bc848b6031e641c031f9827d9e32546ba2480bbddd8cf86f84bc6a62e0ff802e3157546d0b0a6c3c9f792
@@ -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]["description"]
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
@@ -1,3 +1,3 @@
1
1
  module ZendeskAPI
2
- VERSION = "1.31.0"
2
+ VERSION = "1.32.0"
3
3
  end
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.31.0
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-07-13 00:00:00.000000000 Z
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.31.0/CHANGELOG.md
147
- documentation_uri: https://www.rubydoc.info/gems/zendesk_api/1.31.0
148
- source_code_uri: https://github.com/zendesk/zendesk_api_client_rb/tree/v1.31.0
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: []