Hello Team,
We noticed that during our tests the latest version of purecloud-platform-client-v2 in the npm package is missing the retry-after headers.
For example, When we use the version 135.0.0 We get the error response as follows,
{
"status": 429,
"response": {
"req": {
"method": "GET",
"url": "https://api.mypurecloud.ie/api/v2/conversations/02c5bb5a-8103-4ce2-8386-8275750a1fb0",
"headers": {
"authorization": "Bearer HANDLE-AUTH-TOKENS-LIKE-PASSWORDS",
"content-type": "application/json",
"accept": "application/json"
}
},
"header": {
"content-type": "application/json",
"content-length": "208",
"connection": "close",
"date": "Mon, 15 May 2023 07:46:26 GMT",
"retry-after": "23",
"inin-correlation-id": "5dc1f74e-370e-424d-8445-738843183841",
"strict-transport-security": "max-age=600; includeSubDomains",
"cache-control": "no-cache, no-store, must-revalidate",
"x-cache": "Error from cloudfront",
"via": "1.1 4123f5d267403eba4e7db5e4d8d9a6e0.cloudfront.net (CloudFront)",
"x-amz-cf-pop": "CDG50-C2",
"x-amz-cf-id": "3jrxifvvHGRt4u7Dm8SveDFk8OzuYuHFc85vQeDXrLAKFw9rs3ryGg=="
},
"status": 429,
"text": "{"message":"Rate limit exceeded the maximum. Retry the request in [23] seconds","code":"too.many.requests.retry.after","status":429,"contextId":"5dc1f74e-370e-424d-8445-738843183841","details":[],"errors":[]}"
}
}
But from the version 137.1.0 the error response is changed and the below error response is for the version 167.0.0,
{
"message": "Rate limit exceeded the maximum. Retry the request in [14] seconds",
"code": "too.many.requests.retry.after",
"status": 429,
"contextId": "aa7a1cc9-f020-4a39-a130-5fd082f7cf2e",
"details": [],
"errors": []
}
We have the code and status displayed but the retry after headers with the value is not found to proceed further. Could you please let us know the reason for this response change? Is there any workaround for getting the headers? Thank you in advance!
Best Regards,
Punitha