diff --git a/src/services/fhir/sds-fhir-client.js b/src/services/fhir/sds-fhir-client.js index 73d08fe..049e50f 100644 --- a/src/services/fhir/sds-fhir-client.js +++ b/src/services/fhir/sds-fhir-client.js @@ -43,15 +43,15 @@ export const getPracticeAsid = async (odsCode, serviceId) => { logInfo(`Successfully retrieved ASID: ${asidCode} via FHIR for ODS code ${odsCode}`); return asidCode; } catch (err) { + logError(`Failed to retrieve ASID from FHIR for ODS Code: ${odsCode}`, err); if (err.response) { - console.log( + logError( `Error: Request failed with non-2xx status code\n Response body: ${err.response.data}\n HTTP Status code: ${err.response.status}` ); } - logError(`Failed to retrieve ASID from FHIR for ODS Code: ${odsCode}`, err); throw err; } };