From 579810edd64f35710ba5af8807bb1546904d3e65 Mon Sep 17 00:00:00 2001 From: Angel Caamal Date: Fri, 27 Feb 2026 18:38:00 +0000 Subject: [PATCH] fix(healthcare): set responseType to JSON instead of Buffer --- healthcare/fhir/listFhirStores.js | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/healthcare/fhir/listFhirStores.js b/healthcare/fhir/listFhirStores.js index faaa35a2f9..cee46b4bbf 100644 --- a/healthcare/fhir/listFhirStores.js +++ b/healthcare/fhir/listFhirStores.js @@ -26,6 +26,7 @@ const main = ( auth: new google.auth.GoogleAuth({ scopes: ['https://www.googleapis.com/auth/cloud-platform'], }), + responseType: 'json', }); const listFhirStores = async () => { @@ -36,9 +37,13 @@ const main = ( const parent = `projects/${projectId}/locations/${cloudRegion}/datasets/${datasetId}`; const request = {parent}; - const fhirStores = - await healthcare.projects.locations.datasets.fhirStores.list(request); - console.log(JSON.stringify(fhirStores.data)); + try { + const fhirStores = + await healthcare.projects.locations.datasets.fhirStores.list(request); + console.log(JSON.stringify(fhirStores.data)); + } catch (error) { + console.error('Error listing FHIR stores:', error.message || error); + } }; listFhirStores();