Java SDK - 2.62.1
Java SDK - 2.62.1
Apr 30, 2026
Fixed
SCA RedirectUrl rendering on 401 responses with no body
When the 401 error for SCA redirection (401 Unauthorized with the WWW-Authenticate: PendingUserAction RedirectUrl=... header) had no response body, RestTool reported the wrong outcome. connection.getErrorStream() returned null for the empty body, and the next line, checkApiConnection(is), threw a ResponseException with responseHttpCode=500 / responseHttpDescription="Connection to Mangopay API failed".
RestTool now better detects this case (responseCode == 401, error stream null, WWW-Authenticate header present) in both readResponse and doRequestList, and routes it through checkResponseCode(null, headers). The thrown ResponseException now carries:
responseHttpCode = 401andresponseHttpDescription = "SCA required"data.RedirectUrlextracted from theWWW-Authenticateheadererrors.Sca = "SCA required to perform this action."type = "unauthorized"