fanforce-exceptions 0.5.0 → 0.5.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/lib/fanforce/errors/_base.rb +2 -2
- data/lib/fanforce/exceptions/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
MTU0NzkyYWI2YWJiODUyMzI1NjY4NjZiODcyZWY3NTI3NzdlMjFkYQ==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
NzcyOGE2M2RmMzcwMzM2NGUzODZiMTRiNDc3MDZkNjUyMzY3NjliNw==
|
7
7
|
!binary "U0hBNTEy":
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
MWU0NGNmZmMyOTMzZDM1ZTYzMzUyZGJmOTgwNzQ3ODZlNTIzZWJiNzQyMzZm
|
10
|
+
NGE2NmY1MzEzODI4YzM3ZDAzOTE2NmFkMGM4NmZlMGVmMjU2ZjE5NjliNTQ0
|
11
|
+
NWQ0MjU4OTllNWM2ZmY4ODU1ODlmYzE5MDdiYTJlNDIxOWUwZjA=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
YzI5ZTY0OGY4YjQwYzMzNWQ1NTBjMGJiYjk2MzU3N2ZlNDgwY2EyMTYxOGYw
|
14
|
+
MDY1M2VkMTAwYTczMjdlZDdkZmNjMzljYmFiZjVmNDMxMjQ3YWU2ZDQzMmYz
|
15
|
+
MmYyOTliYTI4NzdmZmNiYzZkYTJiN2JhMTY2YmI3MjBhMzVkNDE=
|
@@ -26,7 +26,7 @@ class Fanforce::Error < StandardError
|
|
26
26
|
raw_error = symbolize_keys(raw_error)
|
27
27
|
error = { message: is_blank?(raw_error[:message]) ? default_message : raw_error[:message].to_s }
|
28
28
|
error[:resource] = raw_error[:resource].to_s if is_present?(raw_error[:resource])
|
29
|
-
error[:code] =
|
29
|
+
error[:code] = is_blank?(raw_error[:code]) ? default_error_code : raw_error[:code].to_s
|
30
30
|
error[:field] = raw_error[:field].to_s if is_present?(raw_error[:field])
|
31
31
|
error[:fields] = raw_error[:fields].map {|f| f.to_s } if is_present?(raw_error[:fields])
|
32
32
|
error
|
@@ -88,7 +88,7 @@ end
|
|
88
88
|
class Fanforce::Error::RequestFailed < Fanforce::Error # Request has correct fields but failed for another reason
|
89
89
|
def code; 422 end
|
90
90
|
def default_message; 'Request Failed' end
|
91
|
-
def valid_error_codes; [:invalid_data, :record_already_exists, :maxed_capacity] end
|
91
|
+
def valid_error_codes; [:invalid_data, :record_already_exists, :maxed_capacity, :missing_field, :missing_field_from_list] end
|
92
92
|
def default_error_code; :unknown end
|
93
93
|
end
|
94
94
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fanforce-exceptions
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Caleb Clark
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-10-
|
11
|
+
date: 2013-10-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: fanforce
|