dvci/health_cards

FHIR $health-cards-issue operation fails

gjskha opened this issue · 2 comments

Possibly related to Issue #94 . I created a test script as follows:

cat <<EOF >"/tmp/data"
{
  "resourceType": "Parameters",
  "parameter": [{
    "name": "credentialType",
    "valueUri": "https://smarthealth.cards#covid19"
  }]
}
EOF

curl -X POST 'https://<myinstance>/Patient/8/$health-cards-issue' \
-H 'Content-Type: application/fhir+json' -H 'Accept: application/fhir+json' \
-d @/tmp/data

I get back the following response:

{
  "issue": [
    {
      "severity": "error",
      "code": "exception"
    }
  ],
  "resourceType": "OperationOutcome"
}

The logs don't have much detail in this case.

Processing by HealthCardsController#create as FHIR_JSON
Parameters: {"patient_id"=>"8"}
Completed 500 Internal Server Error in 21ms (Views: 0.1ms | ActiveRecord: 7.6ms | Allocations: 8348)

As with #94, please make sure you're on the latest version. If that doesn't fix the issue, please look in app/controllers/application_controller.rb and comment out all lines in handle_fhir_errors exceptfor theyield`. This should suppress the error handling and give you the full stack trace. I suspect it is the same issue, but this will help to confirm.

Closing as with #94