macarthur-lab / matchbox

matchbox server for the Matchmaker Exchange
BSD 3-Clause "New" or "Revised" License
5 stars 2 forks source link

json message returned from delete requests is malformed #57

Open northwestwitch opened 5 years ago

northwestwitch commented 5 years ago

I stumbled upon this error while trying to parse responses from the server. If for instance you try to delete a patient with this command:

curl -X DELETE -H "X-Auth-Token: abcd" -H "Accept: application/vnd.ga4gh.matchmaker.v1.0+json" -H "Content-Type: application/x-www-form-urlencoded" http://localhost:9020/patient/delete -d '{"id" : "a_patient"}'

You'll get the following response:

{"message":"no patients were deleted, are you sure that ID was valid?","status_code":400"}

Which is missing a " before 400