From 10a67af76c22a3ec0ccd6a869e89f647fb46e214 Mon Sep 17 00:00:00 2001 From: Angel Caamal Date: Thu, 26 Feb 2026 19:23:24 +0000 Subject: [PATCH] fix(healthcare): set responseType to JSON instead of Buffer --- healthcare/fhir/getFhirStoreCapabilities.js | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/healthcare/fhir/getFhirStoreCapabilities.js b/healthcare/fhir/getFhirStoreCapabilities.js index 0d37a2dffa..6d396b853c 100644 --- a/healthcare/fhir/getFhirStoreCapabilities.js +++ b/healthcare/fhir/getFhirStoreCapabilities.js @@ -27,6 +27,7 @@ const main = ( auth: new google.auth.GoogleAuth({ scopes: ['https://www.googleapis.com/auth/cloud-platform'], }), + responseType: 'json', }); const getFhirStoreCapabilities = async () => { @@ -38,9 +39,16 @@ const main = ( const name = `projects/${projectId}/locations/${cloudRegion}/datasets/${datasetId}/fhirStores/${fhirStoreId}/fhir/metadata`; const request = {name}; - const fhirStore = - await healthcare.projects.locations.datasets.fhirStores.get(request); - console.log(JSON.stringify(fhirStore.data, null, 2)); + try { + const fhirStore = + await healthcare.projects.locations.datasets.fhirStores.get(request); + console.log(JSON.stringify(fhirStore.data, null, 2)); + } catch (error) { + console.error( + 'Error getting FHIR store capabilities:', + error.message || error + ); + } }; getFhirStoreCapabilities();