Getting internal server error while using some health ID APIs. It appears to be an unhandled exception when the attributes in body are not in exact case.
In the example below “https://healthidsbx.ndhm.gov.in/api/v1/auth/authWithMobile” API throws 500 error if
–data ‘{ “healthId”: “66-2244-1746-6304”}’ throws following exception.
but no error if
–data ‘{ “healthid”: “66-2244-1746-6304”}’ ; I get the transaction Id.
Exception :
{
“code”: “HIS-500”,
“message”: “An unexpected error has occured. Please try again in sometime.”,
“details”: null
}
Request :
curl --request POST
–url https://healthidsbx.ndhm.gov.in/api/v1/auth/authWithMobile
–header ‘accept: /’
–header ‘accept-language: en-US’
–header ‘authorization: Bearer eyJhbGciOiJSUzI1NiIsInR5cCIgOiAiSldUIiwia2lkIiA6ICJBbFJiNVdDbThUbTlFSl9JZk85ejA2ajlvQ3Y1MXBLS0ZrbkdiX1RCdkswIn0.eyJleHAiOjE2MDMzNzI3MTcsImlhdCI6MTYwMzM3MjExNywianRpIjoiNWVhZDA2MTgtNjk5NS00MjgwLWI3ZjItZTE4NTE2ODI4ZDM0IiwiaXNzIjoiaHR0cHM6Ly9kZXYubmRobS5nb3YuaW4vYXV0aC9yZWFsbXMvY2VudHJhbC1yZWdpc3RyeSIsImF1ZCI6ImFjY291bnQiLCJzdWIiOiJkOTNiYWRlZC02MGJlLTQxYzYtOTI4OC1iMmU1ZmY1NzVkNDkiLCJ0eXAiOiJCZWFyZXIiLCJhenAiOiJQSElMTElQU18xODk2ODEzIiwic2Vzc2lvbl9zdGF0ZSI6IjYzZDA4NTBmLTU0YzgtNDAyZS05ZjVjLWJlYjEyYjRiNzA0ZCIsImFjciI6IjEiLCJhbGxvd2VkLW9yaWdpbnMiOlsiaHR0cDovL2xvY2FsaG9zdDo5MDA3Il0sInJlYWxtX2FjY2VzcyI6eyJyb2xlcyI6WyJoaXUiLCJvZmZsaW5lX2FjY2VzcyIsImhlYWx0aElkIiwiaGlwIl19LCJyZXNvdXJjZV9hY2Nlc3MiOnsiUEhJTExJUFNfMTg5NjgxMyI6eyJyb2xlcyI6WyJ1bWFfcHJvdGVjdGlvbiJdfSwiYWNjb3VudCI6eyJyb2xlcyI6WyJtYW5hZ2UtYWNjb3VudCIsIm1hbmFnZS1hY2NvdW50LWxpbmtzIiwidmlldy1wcm9maWxlIl19fSwic2NvcGUiOiJvcGVuaWQgZW1haWwgcHJvZmlsZSIsImNsaWVudEhvc3QiOiIxMC4yMzMuNjkuMTc0IiwiY2xpZW50SWQiOiJQSElMTElQU18xODk2ODEzIiwiZW1haWxfdmVyaWZpZWQiOmZhbHNlLCJwcmVmZXJyZWRfdXNlcm5hbWUiOiJzZXJ2aWNlLWFjY291bnQtcGhpbGxpcHNfMTg5NjgxMyIsImNsaWVudEFkZHJlc3MiOiIxMC4yMzMuNjkuMTc0In0.TcAJeAyAuK94pcx7upJem41f25_yG8JZe3LZXVm2Aq9HeglBfWpllGiZQ7ZLd8sNTxYMLrBNo8CwVkZEb1lOe65unA94C5wAGcIPwhqzsfmhQLbf25g4N_4WinI91xjk-ED74-7g98vtAZbdtuPGnw6phkT07_Eo3qMszqY-NwND91djn9yvM82DwNAkJZUgOWDyuHTLnu_0ixsd-cCReAsxoNLY3cKppjrk50Eui64Ig75YUbUrAWOnabBUYkrxIRKEUVk1cD9ANIudD2sayz8mVVJ6kiefylnQH-ogrr2K6arBrUfMj3PmFTRTQas_oDRcArVMc-NS4YstJKMqDg’
–header ‘content-type: application/json’
–cookie TS01c078b5=01115a1c909003ca21034e39f67cc8a7f72aa9f4c43efe1ebfdb0d04d59ab0ee328a2890171b9b4bdbec7413a0b2f76a15c6924e78
–data ‘{ “healthId”: “66-2244-1746-6304”}’
Similarly I am getting same exception while using “https://healthidsbx.ndhm.gov.in/api/v1/registration/mobile/createHealthId” API. Not able to identify the issue yet.