Card #139 try and close connection if error creating fhir object