From d89402c6ac913050b329a4b5180f93cd2d51c46c Mon Sep 17 00:00:00 2001 From: Angel Caamal Date: Tue, 3 Mar 2026 23:38:18 +0000 Subject: [PATCH] fix(healthcare): set responseType to JSON instead of Buffer --- healthcare/fhir/patchFhirStore.js | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/healthcare/fhir/patchFhirStore.js b/healthcare/fhir/patchFhirStore.js index c432731f8c..4b99a2267d 100644 --- a/healthcare/fhir/patchFhirStore.js +++ b/healthcare/fhir/patchFhirStore.js @@ -28,6 +28,7 @@ const main = ( auth: new google.auth.GoogleAuth({ scopes: ['https://www.googleapis.com/auth/cloud-platform'], }), + responseType: 'json', }); const patchFhirStore = async () => { @@ -50,10 +51,16 @@ const main = ( }, }; - await healthcare.projects.locations.datasets.fhirStores.patch(request); - console.log( - `Patched FHIR store ${fhirStoreId} with Cloud Pub/Sub topic ${pubsubTopic}` - ); + try { + const response = + await healthcare.projects.locations.datasets.fhirStores.patch(request); + console.log( + `Patched FHIR store ${fhirStoreId} with Cloud Pub/Sub topic ${pubsubTopic}` + ); + console.log(JSON.stringify(response.data, null, 2)); + } catch (error) { + console.error('Error patching FHIR store:', error.message || error); + } }; patchFhirStore();