Files
rr3-apk/decompiled/sources/com/helpshift/network/AuthenticationFailureNetwork.java
Daniel Elliott f9d20bb3fc Add decompiled APK source code (JADX)
- 28,932 files
- Full Java source code
- Smali files
- Resources

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-02-18 14:52:23 -08:00

34 lines
1.6 KiB
Java

package com.helpshift.network;
import com.helpshift.network.HSResponse;
import com.helpshift.network.exception.HSRootApiException;
import com.helpshift.network.exception.NetworkException;
import com.helpshift.util.Utils;
/* loaded from: classes3.dex */
public class AuthenticationFailureNetwork implements HSNetwork {
public final HSNetwork network;
public AuthenticationFailureNetwork(HSNetwork hSNetwork) {
this.network = hSNetwork;
}
@Override // com.helpshift.network.HSNetwork
public HSResponse makeRequest(HSRequestData hSRequestData) {
HSResponse makeRequest = this.network.makeRequest(hSRequestData);
if (makeRequest.getStatus() == HSResponse.NetworkResponseCodes.UNAUTHORIZED_ACCESS.intValue() && !Utils.isEmpty(makeRequest.getResponseString())) {
if ("missing user auth token".equalsIgnoreCase(makeRequest.getResponseString())) {
NetworkException networkException = NetworkException.AUTH_TOKEN_NOT_PROVIDED;
networkException.serverStatusCode = HSResponse.NetworkResponseCodes.AUTH_TOKEN_NOT_PROVIDED.intValue();
throw HSRootApiException.wrap(null, networkException);
}
if ("invalid user auth token".equalsIgnoreCase(makeRequest.getResponseString())) {
NetworkException networkException2 = NetworkException.INVALID_AUTH_TOKEN;
networkException2.serverStatusCode = HSResponse.NetworkResponseCodes.INVALID_AUTH_TOKEN.intValue();
throw HSRootApiException.wrap(null, networkException2);
}
}
return makeRequest;
}
}