From c14a1867a8d4ebeee4ccaff18f09b06db1b1168a Mon Sep 17 00:00:00 2001 From: Angel Caamal Date: Wed, 4 Mar 2026 19:12:04 +0000 Subject: [PATCH] fix(healthcare): set responseType to JSON instead of Buffer --- healthcare/fhir/getFhirStoreIamPolicy.js | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/healthcare/fhir/getFhirStoreIamPolicy.js b/healthcare/fhir/getFhirStoreIamPolicy.js index e31be8c2fc..27058590bc 100644 --- a/healthcare/fhir/getFhirStoreIamPolicy.js +++ b/healthcare/fhir/getFhirStoreIamPolicy.js @@ -27,6 +27,7 @@ const main = ( auth: new google.auth.GoogleAuth({ scopes: ['https://www.googleapis.com/auth/cloud-platform'], }), + responseType: 'json', }); const getFhirStoreIamPolicy = async () => { @@ -38,14 +39,21 @@ const main = ( const resource_ = `projects/${projectId}/locations/${cloudRegion}/datasets/${datasetId}/fhirStores/${fhirStoreId}`; const request = {resource_}; - const fhirStore = - await healthcare.projects.locations.datasets.fhirStores.getIamPolicy( - request + try { + const fhirStore = + await healthcare.projects.locations.datasets.fhirStores.getIamPolicy( + request + ); + console.log( + 'Got FHIR store IAM policy:', + JSON.stringify(fhirStore.data, null, 2) ); - console.log( - 'Got FHIR store IAM policy:', - JSON.stringify(fhirStore.data, null, 2) - ); + } catch (error) { + console.error( + 'Error getting FHIR store IAM policy:', + error.message || error + ); + } }; getFhirStoreIamPolicy();