change_health 5.16.0 → 5.17.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: 3febf96a95dc9999a8f0ef16fb8061d25578e20116f3c9a914e1fa7726a86219
4
- data.tar.gz: 2b2cbdf4fbfde5418f0f8aa59c596d670546d9d4af8b7f5a569f12ed6c7833ee
3
+ metadata.gz: 355fbfa31f70d2fe1b7d96c42f6caad0f56e550f2c26d33f42de7ecdc6cb0496
4
+ data.tar.gz: 715784379b3546edbeb66494388e958d4accc76e7a2e78f4824c122d878d32b0
5
5
  SHA512:
6
- metadata.gz: ee01c27b970f6d2ea3b40d1093c6ec14586ad2ac90e6ba5cc35bfa6e511c28b92813760533ab729a3ac6b7ff9970c4c1e031b2127f081a8e864f46fc97c131ae
7
- data.tar.gz: ea285493ba500e1d25a6ed7673cd3f128b18a972c34af498b8273c7281afce4b5f04a2dbe6e0eced50f6c953cd1c825a90082d6508581af2aa143afdbe3a27c7
6
+ metadata.gz: 99b51f0c666af0450c60fd53095b8280db9f94aa0389db9df0a5f34bcf6f601bb32c36bd1e66fe1146a1f6cfe6737f6d59bc4c2ea74b105efde48e77ad3041ef
7
+ data.tar.gz: 4d7562fe434fe483ef115e420b422764d5c2047d1aa2d6f6b10739283f1c422f94b93b49fc978fb64569386d60e69f078c1d1243996ca62fb23d99af4053227f
data/CHANGELOG.md CHANGED
@@ -5,6 +5,19 @@ All notable changes to this project will be documented in this file.
5
5
  The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
6
6
  and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
7
7
 
8
+ # [5.17.0] - 2024-07-23
9
+
10
+ ### Added
11
+
12
+ * Additional error handling for different format of error response
13
+
14
+ ```
15
+ {
16
+ "error": "invalid_request",
17
+ "error_description": "Invalid request"
18
+ }
19
+ ```
20
+
8
21
  # [5.16.0] - 2024-06-24
9
22
 
10
23
  ### Added
@@ -718,6 +731,7 @@ Added the ability to hit professional claim submission API. For more details, se
718
731
  * Authentication
719
732
  * Configuration
720
733
 
734
+ [5.17.0]: https://github.com/WeInfuse/change_health/compare/v5.16.0...v5.17.0
721
735
  [5.16.0]: https://github.com/WeInfuse/change_health/compare/v5.15.0...v5.16.0
722
736
  [5.15.0]: https://github.com/WeInfuse/change_health/compare/v5.14.0...v5.15.0
723
737
  [5.14.0]: https://github.com/WeInfuse/change_health/compare/v5.13.3...v5.14.0
@@ -16,7 +16,9 @@ module ChangeHealth
16
16
  end
17
17
 
18
18
  def errors?
19
- errors.is_a?(Array) && false == errors.empty?
19
+ field_error = errors.is_a?(Array) && false == errors.empty?
20
+
21
+ field_error || server_error.is_a?(ChangeHealthException)
20
22
  end
21
23
 
22
24
  def errors
@@ -25,6 +27,10 @@ module ChangeHealth
25
27
  errors.flatten.map { |error| ChangeHealth::Response::Error.new(error) }
26
28
  end
27
29
 
30
+ def server_error
31
+ ChangeHealthException.from_response(@response, msg: 'Request') if @raw.dig('error')
32
+ end
33
+
28
34
  def recommend_retry?
29
35
  return false unless errors?
30
36
 
@@ -1,3 +1,3 @@
1
1
  module ChangeHealth
2
- VERSION = '5.16.0'.freeze
2
+ VERSION = '5.17.0'.freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: change_health
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.16.0
4
+ version: 5.17.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mike Crockett
8
- autorequire:
8
+ autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2024-06-25 00:00:00.000000000 Z
11
+ date: 2024-07-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: httparty
@@ -128,7 +128,7 @@ dependencies:
128
128
  - - "~>"
129
129
  - !ruby/object:Gem::Version
130
130
  version: '0.9'
131
- description:
131
+ description:
132
132
  email:
133
133
  - mike.crockett@weinfuse.com
134
134
  executables: []
@@ -206,7 +206,7 @@ licenses:
206
206
  - MIT
207
207
  metadata:
208
208
  allowed_push_host: https://rubygems.org
209
- post_install_message:
209
+ post_install_message:
210
210
  rdoc_options: []
211
211
  require_paths:
212
212
  - lib
@@ -221,8 +221,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
221
221
  - !ruby/object:Gem::Version
222
222
  version: '0'
223
223
  requirements: []
224
- rubygems_version: 3.5.11
225
- signing_key:
224
+ rubygems_version: 3.1.6
225
+ signing_key:
226
226
  specification_version: 4
227
227
  summary: Ruby wrapper for the ChangeHealth API
228
228
  test_files: []