- 28,932 files - Full Java source code - Smali files - Resources Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
32 lines
1.2 KiB
Java
32 lines
1.2 KiB
Java
package com.amazonaws.transform;
|
|
|
|
import com.amazonaws.AmazonClientException;
|
|
import com.amazonaws.AmazonServiceException;
|
|
import com.amazonaws.http.JsonErrorResponseHandler;
|
|
|
|
/* loaded from: classes.dex */
|
|
public class JsonErrorUnmarshaller extends AbstractErrorUnmarshaller<JsonErrorResponseHandler.JsonErrorResponse> {
|
|
public boolean match(JsonErrorResponseHandler.JsonErrorResponse jsonErrorResponse) {
|
|
return true;
|
|
}
|
|
|
|
public JsonErrorUnmarshaller() {
|
|
}
|
|
|
|
public JsonErrorUnmarshaller(Class cls) {
|
|
super(cls);
|
|
}
|
|
|
|
@Override // com.amazonaws.transform.Unmarshaller
|
|
public AmazonServiceException unmarshall(JsonErrorResponseHandler.JsonErrorResponse jsonErrorResponse) {
|
|
String message = jsonErrorResponse.getMessage();
|
|
String errorCode = jsonErrorResponse.getErrorCode();
|
|
if ((message == null || message.isEmpty()) && (errorCode == null || errorCode.isEmpty())) {
|
|
throw new AmazonClientException("Neither error message nor error code is found in the error response payload.");
|
|
}
|
|
AmazonServiceException newException = newException(message);
|
|
newException.setErrorCode(errorCode);
|
|
return newException;
|
|
}
|
|
}
|