User is basically trying to update the last orgAdmin of the organisation to a developer of the same organisation.
This is not allowed and hence the papi apis fail with a http status code 500.
However the development is working on changing the http status code from 500 to 4XX, and a more intuitive response message.
* In addition, while updating a orgAdmin or a developer, the field "RoleName": "devorgadministrators" or "RoleName": "developers" respectively is a mandatory field and should be present in the body of the request.
* If the request body does not have the above "RoleName" field. Hence the request fails every time with a 500 (Internal Server Error. Certain fields are missing from the request.).
* Had the user provided the field "RoleName": "devorgadministrators" in the payload, he would have got the exact error, which would have been
400 (Unable to change the role of the last orgadmin in an organization to a developer user).
* However, since the Model Schema, present on the page, does not mention about the ‘”RoleName” : “String”’ field, the user would have
ignored the field.
* Conveying this information to the user is necessary as, updating other fields (other than role) of a developer or a OrgAdmin user would also fail, if he does not provide the ‘”RoleName” : “String”’ field.