Skip to content

Commit b7a4387

Browse files
authored
fix(healthcare): set responseType to JSON instead of Buffer (#4249)
1 parent 9d8a04c commit b7a4387

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

healthcare/fhir/deleteFhirStore.js

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ const main = (
2727
auth: new google.auth.GoogleAuth({
2828
scopes: ['https://www.googleapis.com/auth/cloud-platform'],
2929
}),
30+
responseType: 'json',
3031
});
3132

3233
const deleteFhirStore = async () => {
@@ -38,8 +39,12 @@ const main = (
3839
const name = `projects/${projectId}/locations/${cloudRegion}/datasets/${datasetId}/fhirStores/${fhirStoreId}`;
3940
const request = {name};
4041

41-
await healthcare.projects.locations.datasets.fhirStores.delete(request);
42-
console.log(`Deleted FHIR store: ${fhirStoreId}`);
42+
try {
43+
await healthcare.projects.locations.datasets.fhirStores.delete(request);
44+
console.log(`Deleted FHIR store: ${fhirStoreId}`);
45+
} catch (error) {
46+
console.error('Error deleting FHIR store:', error.message || error);
47+
}
4348
};
4449

4550
deleteFhirStore();

0 commit comments

Comments
 (0)