Secret service does not handle Entitlements service error responses properly
When the Secret service API receives a request with a token that is not authorized\authenticated:
curl --location --request GET 'https://community.gcp.gnrg-osdu.projects.epam.com/api/secret/v1/secrets' \
--header 'data-partition-id: osdu' \
--header 'Authorization: Bearer TOKEN_WITHOUT_ACCESS
the Entitlements service responds with the proper error code and message:
{
"code": 401,
"reason": "Obtaining user info issue",
"message": "Not valid token provided"
}
But the Secret service does not propagate this response to the user, and in general, can't handle such responses, instead, the user will receive a 500 code internal service error response:
{
"error": {
"code": 500,
"message": "Internal server error",
"errors": [
{
"domain": "global",
"reason": "internalError",
"message": "Internal server error"
}
]
}
}