ndr_lookup 0.3.0 → 0.3.1

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
  SHA256:
3
- metadata.gz: 4b166463e25022038550ad9bae665670beb892bb3db7571c09433697c50fcb80
4
- data.tar.gz: 3aca4b0a8550ea824a8d01dd0f84c9e0abc17be5fedb19d3f85d2af925ee2c94
3
+ metadata.gz: c67e55ec9b88c908bc7f68e98ac30da65c563d693da24c43dfea644c1cb2eeaa
4
+ data.tar.gz: e65b75ddde2fa3201cb0352d6db6215b3ff1faa871b6b7ec923625a8345e77b0
5
5
  SHA512:
6
- metadata.gz: 4d04c47f6edff7ccb720b62bc27d6e5183658e15995e363ce47a036ec4cc175b2e0c808aca0f5546a40fadbc208e8f480e9a62fea0eeff45e29234cb9d17eb5c
7
- data.tar.gz: 8b13686621258be52f9c62e6ec06f7dea39a0eea6a95932d374de1a8e81a0b99982b4b3f65d3d22f0f2873e0af225356643c3d77d909b30d15270ebd71c5ea73
6
+ metadata.gz: 972783e32d189ee2e00ba641f5c9f4d4589844616f22fe3c71f8e7eb5db06daaab1a5004987b052050ef18e70603b04eaac52d1de412aded1c8c539124b3d1ed
7
+ data.tar.gz: c970724bc8e20c8771677a7e4bb1a0cef52614c793f87b7daefc7c3e019f30fed483075dc7aa52f4443e94009ca9c49b861ba276c8f38cef088b119af77fcdc4
data/CHANGELOG.md CHANGED
@@ -1,5 +1,10 @@
1
1
  ## [Unreleased]
2
2
 
3
+ ## 0.3.1 / 2026-03-05
4
+ ### Fixed
5
+ * Strip whitespace from IDs in FHIR Base.find to prevent bad URI errors
6
+ * Handle ApiError/InvalidURIError gracefully in Organisation.find
7
+
3
8
  ## 0.3.0 / 2026-02-26
4
9
  ### Added
5
10
  * Added specific error classes (InvalidURIError, UnauthorizedError) for granular error handling
@@ -27,8 +27,9 @@ module NdrLookup
27
27
  # Finds a specific FHIR resource by type and ID
28
28
  # @return [Hash] Parsed FHIR resource
29
29
  def find(resource_type, id)
30
- with_error_handling("#{resource_type} with ID '#{id}' not found") do
31
- response = connection.get("#{endpoint}/#{resource_type}/#{id}", headers)
30
+ sanitized_id = id.to_s.strip
31
+ with_error_handling("#{resource_type} with ID '#{sanitized_id}' not found") do
32
+ response = connection.get("#{endpoint}/#{resource_type}/#{sanitized_id}", headers)
32
33
  JSON.parse(response.body)
33
34
  end
34
35
  end
@@ -21,6 +21,9 @@ module NdrLookup
21
21
  rescue Client::ResourceNotFound => e
22
22
  logger.info("Organization not found: #{e.message}")
23
23
  nil
24
+ rescue Client::ApiError, Client::InvalidURIError => e
25
+ logger.warn("Organization lookup failed for '#{id}': #{e.message}")
26
+ nil
24
27
  end
25
28
 
26
29
  # ActiveRecord subs .all in to /all which then becomes like finding the id 'all'
@@ -1,3 +1,3 @@
1
1
  module NdrLookup
2
- VERSION = '0.3.0'.freeze
2
+ VERSION = '0.3.1'.freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ndr_lookup
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - NCRS Development Team
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2026-02-26 00:00:00.000000000 Z
11
+ date: 2026-03-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activeresource