Skip to content

Commit cafe235

Browse files
authored
Merge pull request #113 from NHSDigital/ryma2fhir-patch-12
update to find what causign validator error when getting capbaility s…
2 parents a9cec6d + bd67910 commit cafe235

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/common.js.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -890,7 +890,10 @@ export function testFile( folderName: string, fileName: string, failOnWarning :b
890890
const response = await client.post('/$validate', resource).catch(function (error) {
891891
return error.response
892892
})
893-
expect(response.status === 200 || response.status === 400).toBeTruthy()
893+
if (!response) {
894+
console.error("FHIR call did not return a response object");
895+
}
896+
expect(response && (response.status === 200 || response.status === 400)).toBeTruthy();
894897

895898
//we can ignore warnings on retired resources - these would not be in a balloted package
896899
if (json.status == 'retired') {

0 commit comments

Comments
 (0)