Closed samuelimoisili closed 1 year ago
@samuelimoisili can you please share the obtained result versus the expected result? I can't reproduce the issue anymore because you merged the fix to the main branch. It would be helpful to see how the server crashes and with what input. Thanks!
Environment: MacOS 13.1 (22C65); Docker desktop 4.15.0 (93002)l; Docker engine: 20.10.21 CHT 4.1.0: Local using docker compose files cht-core.yml and cht-couchdb.yml interoperability branch: main
{ "_id": "bbca4173-b914-43b6-9fcb-437aa8773f38", "sex":"female"}
Response code: 400 Bad Request
Response Body:
{
"message": "\"name\" is required",
"path": [
"name"
],
"type": "any.required",
"context": {
"label": "name",
"key": "name"
}
}
I put the ticket status as Done, as the branch was already merged with the main branch. @samuelimoisili as a note, it is always better not to merge the branch before acceptance testing is done. Please reference the Development workflow. Thanks!
{ "_id": "bbca4173-b914-43b6-9fcb-437aa8773f38", "sex":"female", "name":"Lorena"}
Response code: 200 OK
Response Body:
{
"status": 400,
"patient": {
"message": "Invalid 'date_of_birth' range: received undefined"
}
}
@samuelimoisili I think the response body is confusing. The status 400 inside de body and the message. Do you think we need to fix this? Please let me know and I can create the issue. Thanks
- When I tried with all the required fields I got the following response: Request: POST http://localhost:5001/mediator/patient
{ "_id": "bbca4173-b914-43b6-9fcb-437aa8773f38", "sex":"female", "name":"Lorena"}
Response code: 200 OK Response Body:{ "status": 400, "patient": { "message": "Invalid 'date_of_birth' range: received undefined" } }
@samuelimoisili I think the response body is confusing. The status 400 inside de body and the message. Do you think we need to fix this? Please let me know and I can create the issue. Thanks
Yeah, I think we'll need to fix it. I'll go ahead to create ticket.
I put the ticket status as Done, as the branch was already merged with the main branch. @samuelimoisili as a note, it is always better not to merge the branch before acceptance testing is done. Please reference the Development workflow. Thanks!
Yeah, I'll take note of that. Thanks.
The create patient route on the mediator server crashes when the request body doesn't contain a
name
field that is a string.