Skip to content

Commit

Permalink
patch undefined method for nil on validator 500 response (#530)
Browse files Browse the repository at this point in the history
* patch undefined method for nil on validator 500 response

* better code
  • Loading branch information
Shaumik-Ashraf committed Sep 22, 2024
1 parent 38387f4 commit 8bce37b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/inferno/dsl/fhir_resource_validation.rb
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,7 @@ def operation_outcome_from_hl7_wrapped_response(response_hash)
end

# assume for now that one resource -> one request
issues = response_hash['outcomes'][0]['issues']&.map do |i|
issues = (response_hash.dig('outcomes', 0, 'issues') || []).map do |i|
{ severity: i['level'].downcase, expression: i['location'], details: { text: i['message'] } }
end
# this is circuitous, ideally we would map this response directly to message_hashes
Expand Down

0 comments on commit 8bce37b

Please sign in to comment.