Closed dubdabasoduba closed 6 days ago
@dubdabasoduba looks like the issue here is the url provided
https://unicef-mg-eusm-preview.smartregister.org/fhir/...
returns a 400:Bad request but https://gateway.unicef-mg-eusm-preview.smartregister.org/fhir/...
(adding gateway. in the beginning) returns the expected results
can you try change the url in the config file?
Did the command work for other imports with this same url? Or was that change effected maybe while you were already in the middle of testing?
@Wambere
I used the same server all through. It's the same one used by OpenSRP web
We usually deploy 2 instances of HAPI.
both point to the same DB
Here are my results for the server in point 1
{
"resourceType": "Bundle",
"id": "331cf120-d519-41bd-ad61-45402cc3423b",
"meta": {
"lastUpdated": "2024-07-11T11:42:52.787+00:00"
},
"type": "searchset",
"total": 0,
"link": [
{
"relation": "self",
"url": "https://unicef-mg-eusm-preview.smartregister.org/fhir/List/_search?_count=1&subject=Location%2Fe01047f8-c160-4ff7-8a8d-d46eb1968f95"
}
]
}
@dubdabasoduba that is the expected result. From the above error, what you were initially getting was not a JSON response, from the fact that it failed when trying to decode the response. My assumption was the change in the url, because that would cause a html 400 response, but it could have been anything else. But with the above response, the code should work as expected. You don't need the List to actually exists. 0 is a perfectly okay response. It just checks first so that it does not try to recreate one that already exists (so importing the same file multiple times won't cause issues)
@Wambere I will try this again and revert
@Wambere I retested this and it seems to work well. Closing the ticket
Context
Errors display
Implementation
Resources