Getting 500 - Internal Server Error for authentication API

We are getting internal server error with the below error response. But unfortunately, with the same credentials the legacy API seems to be working. We are bit stuck with this and any help would be appreciated.

URI:
POST https://eqe.eu.auth0.com/oauth/token

Body:

{
“grant_type”: “password”,
“username”: “test_user@clearchannel.com”,
“password”: “P@ssw0rd”,
“scope”: “openid offline_access”,
“client_id”: “6A4fnYcBItDCLiej2gVrfWhfJBUsikdI”,
“client_secret”: “XXXXXXXXXXXXXXXXXXXX”
}

Response: 500

{
“error”: “server_error”,
“error_description”: “claim.replace is not a function”
}

We were able to trace the underlying cause of this situation; part of the logic responsible for returning user claims for that particular request was assuming a profile property would always be a string and the profile details of your user had a non-string value for that property. The situation was addressed and you should no longer see the issue once the fix is deployed (it can take some time to be available).