From cd7d4b05a5bea8245a29554bfe8c83388d1d63c5 Mon Sep 17 00:00:00 2001 From: Angel Caamal Date: Thu, 5 Mar 2026 18:11:10 +0000 Subject: [PATCH] fix(healthcare): set responseType to JSON instead of Buffer --- healthcare/fhir/deleteFhirStore.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/healthcare/fhir/deleteFhirStore.js b/healthcare/fhir/deleteFhirStore.js index 5c5c34023c..45fc12f0f8 100644 --- a/healthcare/fhir/deleteFhirStore.js +++ b/healthcare/fhir/deleteFhirStore.js @@ -27,6 +27,7 @@ const main = ( auth: new google.auth.GoogleAuth({ scopes: ['https://www.googleapis.com/auth/cloud-platform'], }), + responseType: 'json', }); const deleteFhirStore = async () => { @@ -38,8 +39,12 @@ const main = ( const name = `projects/${projectId}/locations/${cloudRegion}/datasets/${datasetId}/fhirStores/${fhirStoreId}`; const request = {name}; - await healthcare.projects.locations.datasets.fhirStores.delete(request); - console.log(`Deleted FHIR store: ${fhirStoreId}`); + try { + await healthcare.projects.locations.datasets.fhirStores.delete(request); + console.log(`Deleted FHIR store: ${fhirStoreId}`); + } catch (error) { + console.error('Error deleting FHIR store:', error.message || error); + } }; deleteFhirStore();