use of com.amplifyframework.datastore.appsync.AppSyncExtensions in project amplify-android by aws-amplify.
the class SubscriptionProcessor method isExceptionType.
private boolean isExceptionType(DataStoreException exception, AppSyncErrorType errorType) {
if (exception instanceof GraphQLResponseException) {
List<GraphQLResponse.Error> errors = ((GraphQLResponseException) exception).getErrors();
GraphQLResponse.Error firstError = errors.get(0);
if (Empty.check(firstError.getExtensions())) {
return false;
}
AppSyncExtensions extensions = new AppSyncExtensions(firstError.getExtensions());
return errorType.equals(extensions.getErrorType());
}
return false;
}
Aggregations