pusher-platform 0.8.1 → 0.8.2

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: 9b37bcb8a500e8314abca4a507bee5eabc9644544101a00c1d706363ac6dfbb7
4
- data.tar.gz: bdf4363753bbe9307ab8f16acec395460351e59f64b38ce683d0ffa24f575eb1
3
+ metadata.gz: 6c315c31532269c51293733019db6440c0dd2c833f5f4dd5f8159a1228848aba
4
+ data.tar.gz: cea9caa0a6b513d459ed44f1724f2bb435f98044a58a39ff3cec8c4ecec39ff1
5
5
  SHA512:
6
- metadata.gz: 00da9bfd13ca38391540ac1138bfcd255f14935b9c7fc0c2bf53912cb14dac2d758ad89e7f11b39f76b3a10da1002ff1034e11182477208a77ba33c536a576ea
7
- data.tar.gz: a013a69a9adf571c90a232f5d48c0125a016380421fa839d66215ffe963ae04fc69a747a1d2f63166408d3d5786d0d5a54971172d08f63ab8e157223a5f55308
6
+ metadata.gz: 393669d3452ea98b54a6ed2a56bbca5fb2322ce11611e4707f8f60b28f3e406d38a5bb8a3400997ce3ce4a4bf8fd07226ead673b930821d6212e67165a54c52d
7
+ data.tar.gz: 361ffc278f842c6930a18a0f092e05323921e80c7b6b6fc237363cb2bf62296052159395db1ce53d64b4c4ba8e08dfdebeac4d3816ebc56de371d259c5b4f24b
@@ -47,7 +47,7 @@ module PusherPlatform
47
47
  elsif response.status >= 300 && response.status <= 399
48
48
  raise "unsupported redirect response: #{response.status}"
49
49
  elsif response.status >= 400 && response.status <= 599
50
- error_description = begin
50
+ error = begin
51
51
  JSON.parse(response.body)
52
52
  rescue
53
53
  response.body
@@ -55,7 +55,9 @@ module PusherPlatform
55
55
  error_res_opts = {
56
56
  status: response.status,
57
57
  headers: response.headers,
58
- error_description: error_description
58
+ error: error["error"],
59
+ error_description: error["error_description"],
60
+ error_uri: error["error_uri"]
59
61
  }
60
62
  raise ErrorResponse.new(error_res_opts)
61
63
  else
@@ -13,7 +13,9 @@ module PusherPlatform
13
13
  end
14
14
 
15
15
  def to_s
16
- "PusherPlatform::ErrorResponse - status: #{@status} description: #{@error_description}"
16
+ output = "PusherPlatform::ErrorResponse - status: #{@status} description: #{@error_description}."
17
+ output += " Find out more at #{@error_uri}" if @error_uri
18
+ output
17
19
  end
18
20
 
19
21
  def as_json(options = {})
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pusher-platform
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.1
4
+ version: 0.8.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Pusher
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-05-24 00:00:00.000000000 Z
11
+ date: 2018-07-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: excon
@@ -77,7 +77,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
77
77
  version: '0'
78
78
  requirements: []
79
79
  rubyforge_project:
80
- rubygems_version: 2.7.3
80
+ rubygems_version: 2.7.7
81
81
  signing_key:
82
82
  specification_version: 4
83
83
  summary: Pusher Platform Ruby SDK