Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error - HAPI STU3 / R3 - returned HTTP status was 200(Ok) - should be 201(Created) #1299

Closed
Interopguy opened this issue May 5, 2019 · 6 comments

Comments

Projects
None yet
3 participants
@Interopguy
Copy link

commented May 5, 2019

Describe the bug
While testing HAPI with Touchstone - Test Script

Test Script: /FHIR3-0-1-Basic/A-C/AllergyIntolerance/Client Assigned Id/AllergyIntolerance-client-id-xml

Test System: http://fhirtest.uhn.ca/baseDstu3

Error message below

Operation | updateCreate AllergyIntolerance
Status HTTP/1.1 200 OK
Resource AllergyIntolerance ID gJsx-TxRLA6JQA

To Reproduce
Steps to reproduce the behavior:

  1. Go to Touchstone / Login
  2. Select Test Definition / FHIR3-0-1-Basic
  3. Expand A-C, AllegryIntolerance
  4. Select Check-box /FHIR3-0-1-Basic/A-C/AllergyIntolerance/Client Assigned Id/AllergyIntolerance-client-id-xml
  5. Create Test Setup
  6. Destination (FHIR) Server: James Agnew - HAPI / UHN STU3
  7. Execute

Expected behavior**
Status: HTTP/1.1 201 Created

Screenshots
If applicable, add screenshots to help explain your problem.

@patrick-werner

This comment has been minimized.

Copy link
Collaborator

commented May 6, 2019

just had a look at the testscript. This is a test using UPDATE to create a resource with a given ID.
I tried the test with an empty server -> works as expected, return value = 201.

The testscript reuses the ID in every test and deletes the generated resource after the creation. During the next test run this deleted resource is updated to be not deleted anymore. This is considered as an update by hapi so the returned status code = 200.
I think this behaviour is fine as a deleted resource is updated.
@jamesagnew your thoughts on this?

@jamesagnew

This comment has been minimized.

Copy link
Owner

commented May 6, 2019

Innnnnteresting.

@patrick-werner I agree with your assessment.

@Interopguy Are you guys able to modify the test to delete the resource first if it already exists?

@patrick-werner

This comment has been minimized.

Copy link
Collaborator

commented May 6, 2019

@jamesagnew the resource is already deleted before the test starts, but as it isn't expunged. So hapi already knows this id.

@jamesagnew

This comment has been minimized.

Copy link
Owner

commented May 6, 2019

@Interopguy

This comment has been minimized.

Copy link
Author

commented May 6, 2019

@jamesagnew jamesagnew closed this in 702ffd6 May 6, 2019

@jamesagnew

This comment has been minimized.

Copy link
Owner

commented May 6, 2019

Ok, this is fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.