@nsshunt/stsfhirclient 2.0.45 → 2.0.47
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/stsfhirclient.cjs
CHANGED
|
@@ -9831,8 +9831,14 @@ var FhirRESTClient = class {
|
|
|
9831
9831
|
};
|
|
9832
9832
|
else throw new Error(`FhirRESTClient:GetResource(): No response from #InvokeResourceAPI`);
|
|
9833
9833
|
} catch (error) {
|
|
9834
|
-
|
|
9835
|
-
|
|
9834
|
+
if (axios.default.isAxiosError(error)) {
|
|
9835
|
+
const axiosError = error;
|
|
9836
|
+
return {
|
|
9837
|
+
status: axiosError.response.status,
|
|
9838
|
+
body: axiosError.response.data,
|
|
9839
|
+
headers: { ETag: axiosError.response.headers["etag"] }
|
|
9840
|
+
};
|
|
9841
|
+
} else throw error;
|
|
9836
9842
|
}
|
|
9837
9843
|
};
|
|
9838
9844
|
PutResource = async (resourceType, domainResource, versionIdETag) => {
|
|
@@ -9887,8 +9893,14 @@ var FhirRESTClient = class {
|
|
|
9887
9893
|
};
|
|
9888
9894
|
else throw new Error(`FhirRESTClient:GetHistoryInstanceFhirResource(): No response from #InvokeResourceAPI`);
|
|
9889
9895
|
} catch (error) {
|
|
9890
|
-
|
|
9891
|
-
|
|
9896
|
+
if (axios.default.isAxiosError(error)) {
|
|
9897
|
+
const axiosError = error;
|
|
9898
|
+
return {
|
|
9899
|
+
status: axiosError.response.status,
|
|
9900
|
+
body: axiosError.response.data,
|
|
9901
|
+
headers: { ETag: axiosError.response.headers["etag"] }
|
|
9902
|
+
};
|
|
9903
|
+
} else throw error;
|
|
9892
9904
|
}
|
|
9893
9905
|
};
|
|
9894
9906
|
ExtractNumber(str) {
|
|
@@ -9906,8 +9918,15 @@ var FhirRESTClient = class {
|
|
|
9906
9918
|
};
|
|
9907
9919
|
else throw new Error(`FhirRESTClient:DeleteResource(): No response from #InvokeResourceAPI`);
|
|
9908
9920
|
} catch (error) {
|
|
9909
|
-
|
|
9910
|
-
|
|
9921
|
+
if (axios.default.isAxiosError(error)) {
|
|
9922
|
+
const axiosError = error;
|
|
9923
|
+
const versionNumber = this.ExtractNumber(versionIdETag) + 1;
|
|
9924
|
+
return {
|
|
9925
|
+
status: axiosError.response.status,
|
|
9926
|
+
body: axiosError.response.data,
|
|
9927
|
+
headers: { ETag: `W/"${versionNumber}"` }
|
|
9928
|
+
};
|
|
9929
|
+
} else throw error;
|
|
9911
9930
|
}
|
|
9912
9931
|
};
|
|
9913
9932
|
GetMetadata = async () => {
|