Skip to content

Commit 474fd44

Browse files
committed
Merge remote-tracking branch 'mi-fork/fix-fhir-patch-store' into feat/fhir-batch-1-resources
2 parents ea95853 + c7b6c14 commit 474fd44

1 file changed

Lines changed: 11 additions & 4 deletions

File tree

healthcare/fhir/patchFhirStore.js

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ const main = (
2828
auth: new google.auth.GoogleAuth({
2929
scopes: ['https://www.googleapis.com/auth/cloud-platform'],
3030
}),
31+
responseType: 'json',
3132
});
3233

3334
const patchFhirStore = async () => {
@@ -50,10 +51,16 @@ const main = (
5051
},
5152
};
5253

53-
await healthcare.projects.locations.datasets.fhirStores.patch(request);
54-
console.log(
55-
`Patched FHIR store ${fhirStoreId} with Cloud Pub/Sub topic ${pubsubTopic}`
56-
);
54+
try {
55+
const response =
56+
await healthcare.projects.locations.datasets.fhirStores.patch(request);
57+
console.log(
58+
`Patched FHIR store ${fhirStoreId} with Cloud Pub/Sub topic ${pubsubTopic}`
59+
);
60+
console.log(JSON.stringify(response.data, null, 2));
61+
} catch (error) {
62+
console.error('Error patching FHIR store:', error.message || error);
63+
}
5764
};
5865

5966
patchFhirStore();

0 commit comments

Comments
 (0)