forked from intervention-engine/fhir
-
Notifications
You must be signed in to change notification settings - Fork 17
/Patient/nonexistentid/$everything returns 200 #7
Copy link
Copy link
Open
Description
When querying a non-existent ID with the patient ID as the last part of the path, 404 is returned correctly but when $everything is added in the end, 200 is returned instead of 404.
$ curl -vvv localhost:3001/Patient/X32824200X
* Trying ::1...
* TCP_NODELAY set
* Connected to localhost (::1) port 3001 (#0)
> GET /Patient/X32824200X HTTP/1.1
> Host: localhost:3001
> User-Agent: curl/7.54.0
> Accept: */*
>
< HTTP/1.1 404 Not Found
< Vary: Origin
< X-Mutex-Used: 0
< Date: Sun, 13 Oct 2019 20:05:38 GMT
< Content-Length: 0
<
* Connection #0 to host localhost left intact
$ curl -vvv localhost:3001/Patient/X32824200X/\$everything
* Trying ::1...
* TCP_NODELAY set
* Connected to localhost (::1) port 3001 (#0)
> GET /Patient/X32824200X/$everything HTTP/1.1
> Host: localhost:3001
> User-Agent: curl/7.54.0
> Accept: */*
>
< HTTP/1.1 200 OK
< Content-Type: application/fhir+json; charset=utf-8
< Vary: Origin
< X-Mutex-Used: 0
< Date: Sun, 13 Oct 2019 20:06:05 GMT
< Content-Length: 378
<
* Connection #0 to host localhost left intact
{"resourceType":"Bundle","meta":{"lastUpdated":"2019-10-13T20:06:05Z"},"type":"searchset","id":"5da383adfeec7576da2c0455","link":[{"relation":"self","url":"http://localhost:3001/Patient?_id=X32824200X&_offset=0&_count=100&_include=%2A&_revinclude=%2A"},{"relation":"first","url":"http://localhost:3001/Patient?_id=X32824200X&_offset=0&_count=100&_include=%2A&_revinclude=%2A"}]}
server log:
[GIN] 2019/10/13 - 20:05:44 | 404 | 7.187µs | 172.17.0.1 | GET /Patient/X32824200X
[GIN] 2019/10/13 - 20:06:05 | 200 | 9.484635ms | 172.17.0.1 | GET /Patient/X32824200X/$everything
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels