I'm building an APP with React Native and MAS SDK 2.3.00 and I was trying to get the request code of the method onError of MAS.Invoke.
The Solution that I had is:
if(Objects.equals(e.getMessage(), "Unauthorized")) {
Log.e("HTTP Status Code", "401");
}
Can you tell me how I can get the "real" status code of MAS.Invoke in method onError?
Release : 4.2
To expose the http status code you can use the sample below.
int responseCode = ((TargetApiException)e.getCause()).getResponse().getResponseCode();