@nsshunt/ststestrunner 1.1.165 → 1.1.167
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/ststestrunner.mjs
CHANGED
|
@@ -2330,29 +2330,36 @@ var TestCaseFhir08 = class extends TestCaseFhirQueryBase {
|
|
|
2330
2330
|
const __snapshot4 = this._CheckOutputLongDurationError(__snapshot3, "await this.GetResource()");
|
|
2331
2331
|
if (retVal.status === StatusCodes.UNAUTHORIZED) throw new Error("UNAUTHORIZED");
|
|
2332
2332
|
const resource = retVal.body;
|
|
2333
|
-
|
|
2334
|
-
|
|
2335
|
-
|
|
2336
|
-
|
|
2337
|
-
|
|
2338
|
-
|
|
2339
|
-
|
|
2340
|
-
|
|
2341
|
-
|
|
2342
|
-
|
|
2343
|
-
|
|
2344
|
-
|
|
2345
|
-
|
|
2346
|
-
|
|
2347
|
-
|
|
2348
|
-
|
|
2349
|
-
|
|
2350
|
-
|
|
2351
|
-
|
|
2352
|
-
if (axiosError.response
|
|
2353
|
-
|
|
2333
|
+
if (resource.meta) {
|
|
2334
|
+
const loadedRecordVersion = parseInt(resource.meta.versionId);
|
|
2335
|
+
try {
|
|
2336
|
+
const retVal = await client.DeleteResource("Person", personRecord.id, `W/"${loadedRecordVersion}"`);
|
|
2337
|
+
this._CheckOutputLongDurationError(__snapshot4, "await this.DeleteResource()");
|
|
2338
|
+
if (retVal.status === StatusCodes.UNAUTHORIZED) throw new Error("UNAUTHORIZED");
|
|
2339
|
+
const deletedRetValCheck = {
|
|
2340
|
+
resourceType: "OperationOutcome",
|
|
2341
|
+
issue: [{
|
|
2342
|
+
severity: "error",
|
|
2343
|
+
code: "deleted",
|
|
2344
|
+
diagnostics: `DeleteResource: Resource ${personRecord.id} version ${loadedRecordVersion + 1} has been deleted.`
|
|
2345
|
+
}]
|
|
2346
|
+
};
|
|
2347
|
+
this.CheckReturnData(deletedRetValCheck, retVal.body);
|
|
2348
|
+
return retVal.body;
|
|
2349
|
+
} catch (error) {
|
|
2350
|
+
if (axios.isAxiosError(error)) {
|
|
2351
|
+
const axiosError = error;
|
|
2352
|
+
if (axiosError.response) {
|
|
2353
|
+
if (axiosError.response.status !== StatusCodes.GONE) throw error;
|
|
2354
|
+
return null;
|
|
2355
|
+
} else throw error;
|
|
2354
2356
|
} else throw error;
|
|
2355
|
-
}
|
|
2357
|
+
}
|
|
2358
|
+
} else {
|
|
2359
|
+
console.log(resource);
|
|
2360
|
+
console.log(retVal.status);
|
|
2361
|
+
await Sleep(1e3);
|
|
2362
|
+
return null;
|
|
2356
2363
|
}
|
|
2357
2364
|
};
|
|
2358
2365
|
};
|