From 26e44a2d463f55ba5f2838195f1a8e2567193cac Mon Sep 17 00:00:00 2001 From: gered Date: Wed, 6 Aug 2014 08:57:41 -0400 Subject: [PATCH] add some additional explanation of the keys in fhir error exceptions --- README.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/README.md b/README.md index bb07fb5..9084a00 100644 --- a/README.md +++ b/README.md @@ -494,6 +494,13 @@ is set in the exception. "Unknown resource type 'Foobar' - Server knows how to handle: [User, Condition, Supply, GVFVariant, Organization, Group, ValueSet, Coverage, ImmunizationRecommendation, Appointment, MedicationDispense, MedicationPrescription, Slot, AppointmentResponse, MedicationStatement, SequencingLab, Questionnaire, Composition, OperationOutcome, Conformance, Media, Other, Profile, DocumentReference, Immunization, Microarray, OrderResponse, ConceptMap, Practitioner, ImagingStudy, GVFMeta, CarePlan, Provenance, Device, Query, Order, Procedure, Substance, DiagnosticReport, Medication, MessageHeader, DocumentManifest, Availability, MedicationAdministration, Encounter, SecurityEvent, GeneExpression, SequencingAnalysis, List, DeviceObservationReport, Claim, FamilyHistory, Location, AllergyIntolerance, GeneticAnalysis, Observation, RelatedPerson, Specimen, Alert, Patient, Remittance, AdverseReaction, DiagnosticOrder]"}]}} ``` +Note that when using `ex-data` to retrieve more detailed error information, the map +returned will always contain the following information: + +* `:status` the HTTP status code of the error response +* `:response` the actual body of the response. parsed as JSON if the response was detected to be a FHIR response (e.g. an OperationOutcome) +* `:fhir-resource?` will be true if `:response` contains FHIR content, false otherwise (in which case, `:response` likely contains a string of HTML). + ## License Licensed under the Apache License, Version 2.0 (the "License");