cirro-ruby-client 2.6.0 → 2.6.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/cirro_io/client/version.rb +1 -1
- data/lib/cirro_io_v2/client.rb +1 -0
- data/lib/cirro_io_v2/errors/client_error.rb +29 -0
- data/lib/cirro_io_v2/request_clients/base.rb +2 -0
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3648839ab1f56e097e5808947ec9c89fc0b9d8761435f7d557a6134d6982122a
|
4
|
+
data.tar.gz: eeb647f8aed3277b5ac80ac42042841a7b86d568a509bd80fef2e031684b27b3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 713cd914e95f804ed04c98bca0ef97c2d0d92ec52ba71d9be8e006a790bbdbdff9a40600b382b0e6bf734c7889b50f52f3b78dc552e6c2e339a187628748d2bb
|
7
|
+
data.tar.gz: 7589640cb2517d06a0d209e0eda8e457e8edd8ab631814971cb3584e71d9d45413633dc23eaec93f15d97baa5997b7662a6d95a81816fa60f75db0d6893c7b00
|
data/Gemfile.lock
CHANGED
data/lib/cirro_io_v2/client.rb
CHANGED
@@ -0,0 +1,29 @@
|
|
1
|
+
require 'forwardable'
|
2
|
+
|
3
|
+
module CirroIOV2
|
4
|
+
module Errors
|
5
|
+
class ClientError < StandardError
|
6
|
+
extend Forwardable
|
7
|
+
|
8
|
+
def_instance_delegators :@faraday_error, :response, :full_message
|
9
|
+
|
10
|
+
attr_reader :faraday_error
|
11
|
+
|
12
|
+
# this error class is intended to be used ONLY for 4xx errors
|
13
|
+
# https://www.rubydoc.info/github/lostisland/faraday/Faraday/ClientError
|
14
|
+
|
15
|
+
def initialize(faraday_error)
|
16
|
+
@faraday_error = faraday_error
|
17
|
+
end
|
18
|
+
|
19
|
+
def message
|
20
|
+
puts faraday_error.response.inspect
|
21
|
+
faraday_error.response.then do |response|
|
22
|
+
return response.inspect if ENV.fetch('DEBUG_CIRRO_RUBY_CLIENT', false)
|
23
|
+
|
24
|
+
faraday_error.response[:body].presence || faraday_error.try[:message]
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cirro-ruby-client
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.6.
|
4
|
+
version: 2.6.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Cirro Dev Team
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-
|
11
|
+
date: 2023-12-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -122,6 +122,7 @@ files:
|
|
122
122
|
- lib/cirro_io/client/version.rb
|
123
123
|
- lib/cirro_io/client/worker_filter.rb
|
124
124
|
- lib/cirro_io_v2/client.rb
|
125
|
+
- lib/cirro_io_v2/errors/client_error.rb
|
125
126
|
- lib/cirro_io_v2/errors/http_error.rb
|
126
127
|
- lib/cirro_io_v2/errors/response_not_json_error.rb
|
127
128
|
- lib/cirro_io_v2/request_clients/base.rb
|