@nsshunt/stsfhirclient 2.0.48 → 2.0.50
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.mjs
CHANGED
|
@@ -10184,6 +10184,7 @@ var FhirRESTClient = class {
|
|
|
10184
10184
|
} catch (error) {
|
|
10185
10185
|
if (axios.isAxiosError(error)) {
|
|
10186
10186
|
const axiosError = error;
|
|
10187
|
+
if (axiosError.response.status === StatusCodes.UNAUTHORIZED) throw error;
|
|
10187
10188
|
return {
|
|
10188
10189
|
status: axiosError.response.status,
|
|
10189
10190
|
body: axiosError.response.data,
|
|
@@ -10246,6 +10247,7 @@ var FhirRESTClient = class {
|
|
|
10246
10247
|
} catch (error) {
|
|
10247
10248
|
if (axios.isAxiosError(error)) {
|
|
10248
10249
|
const axiosError = error;
|
|
10250
|
+
if (axiosError.response.status === StatusCodes.UNAUTHORIZED) throw error;
|
|
10249
10251
|
return {
|
|
10250
10252
|
status: axiosError.response.status,
|
|
10251
10253
|
body: axiosError.response.data,
|
|
@@ -10271,18 +10273,14 @@ var FhirRESTClient = class {
|
|
|
10271
10273
|
} catch (error) {
|
|
10272
10274
|
if (axios.isAxiosError(error)) {
|
|
10273
10275
|
const axiosError = error;
|
|
10274
|
-
if (axiosError.response
|
|
10275
|
-
|
|
10276
|
-
|
|
10277
|
-
|
|
10278
|
-
|
|
10279
|
-
|
|
10280
|
-
|
|
10281
|
-
|
|
10282
|
-
} else {
|
|
10283
|
-
this.LogError("DeleteResource", error);
|
|
10284
|
-
throw error;
|
|
10285
|
-
}
|
|
10276
|
+
if (axiosError.response.status === StatusCodes.UNAUTHORIZED) throw error;
|
|
10277
|
+
const versionNumber = this.ExtractNumber(versionIdETag) + 1;
|
|
10278
|
+
return {
|
|
10279
|
+
status: axiosError.response.status,
|
|
10280
|
+
body: axiosError.response.data,
|
|
10281
|
+
headers: { ETag: `W/"${versionNumber}"` }
|
|
10282
|
+
};
|
|
10283
|
+
} else throw error;
|
|
10286
10284
|
}
|
|
10287
10285
|
};
|
|
10288
10286
|
GetMetadata = async () => {
|