horizon_client 0.1.0 → 0.1.1

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
  SHA1:
3
- metadata.gz: fb395e5f2b23f7735ab1549c681e256416f8a100
4
- data.tar.gz: b6bea60d63ab9e74ce52b72028ee9fca85feaadd
3
+ metadata.gz: 8fbc26ad88c7153d70742da5e36297418d331f3f
4
+ data.tar.gz: e9f1341564048999b61e9f2859a39c8b6e7f890c
5
5
  SHA512:
6
- metadata.gz: 69411579c286d798d365526aab6197c66554eeb5a2d588644472ff9970b465a5470f9438e1e8737bf74e8244ca64bedfc53558f3c3dbe957ef49d2c64255bef0
7
- data.tar.gz: ebe62d15894bd5e9666a1188d27a6537d8a457fe8a059b8fa97f7cfdecec58a1b5bac3c42684694f469c76804d90083cca5e5f51ed3b3d0df1e304295a7cbe58
6
+ metadata.gz: 3bb0e9929ca4a976310477392f598cc5fba4d1d683315ac829b152f92c161eecf1713f75e1cbede84ad1815ba819001be19b453f2cd2e05ff06a15c2d913be86
7
+ data.tar.gz: 8fb6742b74ce1ccbac74011c8b13bc9a8713626e91bdb61028d2e593c139780ab8c5944502201ece53752f3c51e32dc02f0a9db0807310539ed2c52c20e48e41
data/.gitignore CHANGED
@@ -10,3 +10,5 @@
10
10
 
11
11
  # rspec failure tracking
12
12
  .rspec_status
13
+
14
+ *.gem
@@ -10,8 +10,17 @@ module HorizonClient
10
10
 
11
11
  class ClientError < Faraday::ClientError
12
12
  def initialize(e)
13
- info = e.response ? e.response[:body].fetch('error', {}).fetch('message', '') : ''
14
- super [e.message, info].join(': ')
13
+ message = e.message
14
+ if e.response.is_a?(Hash)
15
+ body = e.response[:body]
16
+ if body.is_a?(Hash)
17
+ error = body['error']
18
+ if error.is_a?(Hash)
19
+ message += ": #{error['message']}"
20
+ end
21
+ end
22
+ end
23
+ super message
15
24
  end
16
25
  end
17
26
 
@@ -1,3 +1,3 @@
1
1
  module HorizonClient
2
- VERSION = "0.1.0"
2
+ VERSION = "0.1.1"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: horizon_client
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - MAK IT
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-03-13 00:00:00.000000000 Z
11
+ date: 2017-03-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler