bunny_app 1.24.0 → 1.25.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: ff90fdfad4c4f392712b064e24008969d06ccd094ab0ec08c7af632fae260c6d
4
- data.tar.gz: ad0a4ca25bf828a86aaedfa91eb2f56a4fbd7bedebaf71e250e623e37f98509a
3
+ metadata.gz: '019de290c7ea498f815013ec4361ed8d6f6b4282df2a569efbe2115d38767e1e'
4
+ data.tar.gz: 53307b39bff195f94f016c5df7a7450be01dc81ce35d49e68a44fd9ad623f0b6
5
5
  SHA512:
6
- metadata.gz: 3ac116e866190940b1e6287ee30107420a04191c574f54e118995fa628f5e4eda64a1f76658053051ed96e7dda790657f3ba2d05c57240e11e7eb717532b3044
7
- data.tar.gz: da749c01c6f07a77f31a3d486353681f8226032dd36988f46f026c5e5995f46aa9f103a037170891d3d103f9dace6cd8990902e7d57cd09088192fdf083f7f82
6
+ metadata.gz: 882dd75a55c66339e07d1cd5ad7cd35812ccd691be9930358e26700c67d441b096353bfb7b2baa274590086449da6efcc274d540a4d60a389204c6e2574c8d33
7
+ data.tar.gz: 4c6021936e7628efb492179b0c4da2b24ae1b3606280b8627ddfc4ee496d4ae0189b291e05f56b799adc086996e915bbf45f2f271f2c2272479fa25c15912d7d
@@ -58,7 +58,11 @@ module BunnyApp
58
58
 
59
59
  case res.code.to_s
60
60
  when /2[0-9][0-9]/ # HTTP 2xx
61
- JSON.parse(res.body)
61
+ response_body = JSON.parse(res.body)
62
+ raise ResponseError, response_body['errors'] if response_body['errors']
63
+
64
+ response_body
65
+
62
66
  when /401/ # Access Token Expired
63
67
  raise AuthorizationError, 'Invalid access token' unless BunnyApp.retryable
64
68
  raise AuthorizationError, 'Invalid api credentials' if retries >= 1
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module BunnyApp
4
- VERSION = '1.24.0'
4
+ VERSION = '1.25.0'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bunny_app
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.24.0
4
+ version: 1.25.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Bunny
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2023-01-15 00:00:00.000000000 Z
12
+ date: 2023-01-16 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: httparty