File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff 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 getFhirStoreCapabilities = async ( ) => {
@@ -38,9 +39,16 @@ const main = (
3839 const name = `projects/${ projectId } /locations/${ cloudRegion } /datasets/${ datasetId } /fhirStores/${ fhirStoreId } /fhir/metadata` ;
3940 const request = { name} ;
4041
41- const fhirStore =
42- await healthcare . projects . locations . datasets . fhirStores . get ( request ) ;
43- console . log ( JSON . stringify ( fhirStore . data , null , 2 ) ) ;
42+ try {
43+ const fhirStore =
44+ await healthcare . projects . locations . datasets . fhirStores . get ( request ) ;
45+ console . log ( JSON . stringify ( fhirStore . data , null , 2 ) ) ;
46+ } catch ( error ) {
47+ console . error (
48+ 'Error getting FHIR store capabilities:' ,
49+ error . message || error
50+ ) ;
51+ }
4452 } ;
4553
4654 getFhirStoreCapabilities ( ) ;
You can’t perform that action at this time.
0 commit comments