Open 4reha opened 2 weeks ago
Hello, thanks for the detailed bug report, this is indeed an issue when using IMS authentication: the HTTP 401 error is hidden inside the error message and therefore not correctly handled by the SDK. I'll provide a fix shortly.
Expected Behaviour
According to the documentation, the
refreshClient
function should be called when the ACC session expires due to token expiration. This allows the client to refresh the token and retry the failed SOAP call.Actual Behaviour
When the token expires, the refresh callback never called, and the sdk returns a 500 Internal Server Error with the following error message:
The error message indicates that the underlying issue is a 401 Unauthorized error, but it's being wrapped as a 500 Internal Server Error. As a result, the SDK's condition
ex.statusCode == 401
is not met, and therefreshClient
function is never called.Reproduce Scenario (including but not limited to)
Steps to Reproduce
refreshClient
function, similar to the following:Platform and Version