redox 1.8.2 → 1.8.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 +4 -4
- data/CHANGELOG.md +6 -0
- data/lib/redox/redox_exception.rb +6 -5
- data/lib/redox/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 613d04cb8ea6250a17085c297425e58d3ffd5a8b3c5e9206bb14cb5e5759e2e0
|
4
|
+
data.tar.gz: c89b3fb089fdcefc50dc02a56e734a689f2ee2daa20eb5d463ca6c084c1b5e4c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8beb8a1efd15abe04aacca76d3a9dd072a8821338ed35cf1f3c33d6807e04b9b9e9f6df71654fc8db5fb94fc9b32926bc06f0cac1b4810d512a707734f505c3f
|
7
|
+
data.tar.gz: 74f7fcdd219eb747bcb560cf371d7bba1208add6ade3a716861322a4dcb930deedbf563567b6c72ae1cf2355960cc50aca4bd7000e9ffb84689574fbcf46a46d
|
data/CHANGELOG.md
CHANGED
@@ -4,9 +4,14 @@ All notable changes to this project will be documented in this file.
|
|
4
4
|
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
|
5
5
|
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
|
6
6
|
|
7
|
+
## [1.8.3] - 2022-8-12
|
8
|
+
### Added
|
9
|
+
- Improved RedoxException error handling
|
10
|
+
|
7
11
|
## [1.8.2] - 2022-2-23
|
8
12
|
### Added
|
9
13
|
- DirectAddressFrom and DirectAddressTo to Media Model
|
14
|
+
|
10
15
|
## [1.8.1] - 2022-1-25
|
11
16
|
### Added
|
12
17
|
- Components, OrderedBy, Indications, and AdministeringProvider to Medication Model
|
@@ -190,6 +195,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
|
|
190
195
|
### Added
|
191
196
|
- Initial Release
|
192
197
|
|
198
|
+
[1.8.3]: https://github.com/WeInfuse/redox/compare/v1.8.2...v1.8.3
|
193
199
|
[1.8.2]: https://github.com/WeInfuse/redox/compare/v1.8.1...v1.8.2
|
194
200
|
[1.8.1]: https://github.com/WeInfuse/redox/compare/v1.8.0...v1.8.1
|
195
201
|
[1.8.0]: https://github.com/WeInfuse/redox/compare/v1.7.4...v1.8.0
|
@@ -2,15 +2,16 @@ module Redox
|
|
2
2
|
class RedoxException < Exception
|
3
3
|
def self.from_response(response, msg: nil)
|
4
4
|
exception_msg = "Failed #{msg}:"
|
5
|
-
exception_msg << " HTTP code: #{response
|
5
|
+
exception_msg << " HTTP code: #{response&.code} MSG: "
|
6
6
|
|
7
7
|
begin
|
8
|
-
error_response =
|
8
|
+
error_response = response.parsed_response
|
9
|
+
error_list = error_response&.[]('Meta')&.[]('Errors')
|
9
10
|
|
10
|
-
if
|
11
|
-
exception_msg <<
|
11
|
+
if error_list
|
12
|
+
exception_msg << error_list.map {|el| el['Text'] || el.to_s }.join('|')
|
12
13
|
else
|
13
|
-
exception_msg << error_response
|
14
|
+
exception_msg << error_response.to_s
|
14
15
|
end
|
15
16
|
rescue JSON::ParserError
|
16
17
|
exception_msg << response.body
|
data/lib/redox/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: redox
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.8.
|
4
|
+
version: 1.8.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Alexander Clark
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: exe
|
12
12
|
cert_chain: []
|
13
|
-
date: 2022-
|
13
|
+
date: 2022-08-12 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: httparty
|
@@ -202,7 +202,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
202
202
|
- !ruby/object:Gem::Version
|
203
203
|
version: '0'
|
204
204
|
requirements: []
|
205
|
-
rubygems_version: 3.1.
|
205
|
+
rubygems_version: 3.1.6
|
206
206
|
signing_key:
|
207
207
|
specification_version: 4
|
208
208
|
summary: Ruby wrapper for the Redox Engine API
|