cb-api 21.3.2 → 21.3.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 7b3d3467a541fe01fbf677fa7c6c21b6dc1e7530
4
- data.tar.gz: f312799f899a88f53a5bb1b62ea5a8100fdedf6a
3
+ metadata.gz: 7b3345f6917865639b2895b89958aca0b88cdd96
4
+ data.tar.gz: d9d26b5a3eef9e0c28606b67d95c467806bef032
5
5
  SHA512:
6
- metadata.gz: 1425f28549f07ce7e5c2bc59a7de9baab6f4163b64c54644fdaae821fedc8acf8d78c0c4a37b85148b2b5c9e66674d8b05f12db70785b6397201240a7f067f64
7
- data.tar.gz: 1aefdd8c9981287f2e361ae7ef7c8fb87beb4cc7b1048c4c062e47919c6011e6ce02121b6d87b0027f8b922aa16fed9dc283027e6f73a730236a371e5ee7264b
6
+ metadata.gz: 02eff17bccaa49fec2b0a58d16e30bdfd77fe978385c8f0831cb32682f5f5572174fcef790cff635b98cad7231bc06c11e34a05d8be81082fd50a8f054dfa193
7
+ data.tar.gz: f1e4fe5cb7329a214cbf206dae0791bdc44b2fbc1a60b5f9a0dd1b849e6a3b98f50070c32fa50d2d21d8b87fdbec9ec3844420b5087784c14f459f7c16ab4000
data/CHANGELOG.md CHANGED
@@ -2,6 +2,7 @@ Version History
2
2
  ====
3
3
  * All Version bumps are required to update this file as well!!
4
4
  ----
5
+ * 21.3.3 Get whole error node, not just first. Check for 'Errors' instead of just 'errors'
5
6
  * 21.3.2 Follow style guide more closely and use `.first` + return empty string when no errors node
6
7
  * 21.3.1 Add error message to error raised from API
7
8
  * 21.3.0 Add better error message to MissingRequiredField error in api_response
@@ -32,8 +32,7 @@ module Cb
32
32
 
33
33
  def fail_with_error_details(response, error_type)
34
34
  processed_response = process_response_body(response)
35
- error_message = processed_response['errors'] ? processed_response['errors'].first : ''
36
- error = error_type.new(error_message)
35
+ error = error_type.new(error_message(processed_response))
37
36
  error.code = response.code rescue nil
38
37
  error.raw_response = response
39
38
  error.response = processed_response
@@ -64,6 +63,16 @@ module Cb
64
63
  rescue MultiXml::ParseError
65
64
  nil
66
65
  end
66
+
67
+ def error_message(processed_response)
68
+ if processed_response['errors']
69
+ processed_response['errors']
70
+ elsif processed_response['Errors']
71
+ processed_response['Errors']
72
+ else
73
+ ''
74
+ end
75
+ end
67
76
  end
68
77
  end
69
78
  end
data/lib/cb/version.rb CHANGED
@@ -9,5 +9,5 @@
9
9
  # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
10
10
  # See the License for the specific language governing permissions and limitations under the License.
11
11
  module Cb
12
- VERSION = '21.3.2'
12
+ VERSION = '21.3.3'
13
13
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cb-api
3
3
  version: !ruby/object:Gem::Version
4
- version: 21.3.2
4
+ version: 21.3.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - The CareerBuilder.com Niche and Consumer Development teams