active-campaign-simple 0.3.3a → 0.3.3b
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 39fc1fed772ae97290b45b98ba305792f6d5f0897709c04250ecc1f9e821c811
|
4
|
+
data.tar.gz: c1ac9a3101dbffd599205646531f53164094b1cb38eab55c8937089219aff6b2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c4435b32465131714636992e5971939937257cccc44e3d953032c6e244edfe55c6db738420fda7c8cdabc3cf03c83f3f251df438400624783254f7d6bb3808dd
|
7
|
+
data.tar.gz: 39ac549329357b245fcb1cb3534464a85518cca129048a9c1a76768557762eead8ab34d9ccfc1a2e1b9ecea4dd404a12b8e2b0a9e5298c70646cdb4d86189bfd
|
@@ -2,20 +2,18 @@ require 'active-campaign-simple/exceptions'
|
|
2
2
|
|
3
3
|
module ActiveCampaign
|
4
4
|
class ExceptionHandler
|
5
|
-
|
6
5
|
ERRORS = {
|
7
6
|
'404 Not Found' => ActiveCampaign::NotFoundError,
|
8
7
|
'422 Unprocessable Entity' => ActiveCampaign::UnprocessableEntityError
|
9
8
|
}
|
10
9
|
|
11
10
|
def initialize(error)
|
12
|
-
error_class = ERRORS
|
11
|
+
error_class = ERRORS.find { |status, _| error.message.start_with?(status) }&.last
|
13
12
|
if error_class
|
14
|
-
raise error_class.new(error)
|
13
|
+
raise error_class.new(error), "#{error.message}\nResponse body:\n#{error.response&.body}\nStack trace:\n#{error.backtrace.join("\n")}"
|
15
14
|
else
|
16
|
-
raise ActiveCampaign::APIError.new(error)
|
15
|
+
raise ActiveCampaign::APIError.new(error), "#{error.message}\nResponse body:\n#{error.response&.body}\nStack trace:\n#{error.backtrace.join("\n")}"
|
17
16
|
end
|
18
17
|
end
|
19
|
-
|
20
18
|
end
|
21
|
-
end
|
19
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: active-campaign-simple
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.3b
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nathan Leavitt
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-04-
|
11
|
+
date: 2023-04-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|