wcmc-its / ReCiter

ReCiter: an enterprise open source author disambiguation system for academic institutions
Apache License 2.0
46 stars 25 forks source link

500 Internal Server Error for _dar7342 #491

Closed paulalbert1 closed 2 years ago

paulalbert1 commented 2 years ago

When I run the following. I get a 500 internal server error.

curl -X GET "https://reciter.weill.cornell.edu/reciter/feature-generator/by/uid?uid=_dar7342" -H "accept: application/json" -H "api-key:  XXXX"

The JSON for _dar7342, which I created manually, is well-formed and was accepted by the Identity API. If it wasn't valid in some respect, it shouldn't have been accepted.

Here's what I loaded via the API.

{
 "uid": "_dar7342",
  "institutions": [
   "New York Hospital",
   "Vanderbilt University School of Medicine",
   "Johns Hopkins Medical School",
   "Johns Hopkins Hospital",
   "Cornell University Medical College"
  ],
  "primaryName": {
   "lastName": "Rogers",
   "firstName": "David",
   "middleName": "Elliott",
   "middleInitial": "E",
   "firstInitial": "D"
  },
  "organizationalUnits": [
   {
    "organizationalUnitLabel": "Infectious Diseases",
    "organizationalUnitType": "DIVISION"
   }
  ],
  "degreeYear": {
   "bachelorYear": 0,
   "doctoralYear": 1948
  },
  "title": "Walsh McDermott University Professor of Medicine",
  "primaryOrganizationalUnit": "Infectious Diseases"
}

Here's how the identity object looks in DynamoDB (note the inclusion of "identity"):

{
 "uid": "_dar7342",
 "identity": {
  "institutions": [
   "New York Hospital",
   "Vanderbilt University School of Medicine",
   "Johns Hopkins Medical School",
   "Johns Hopkins Hospital",
   "Cornell University Medical College"
  ],
  "primaryName": {
   "lastName": "Rogers",
   "firstName": "David",
   "middleName": "Elliott",
   "middleInitial": "E",
   "firstInitial": "D"
  },
  "organizationalUnits": [
   {
    "organizationalUnitLabel": "Infectious Diseases",
    "organizationalUnitType": "DIVISION"
   }
  ],
  "degreeYear": {
   "bachelorYear": 0,
   "doctoralYear": 1948
  },
  "title": "Walsh McDermott University Professor of Medicine",
  "primaryOrganizationalUnit": "Infectious Diseases"
 }
}
paulalbert1 commented 2 years ago

Covered by #492