@Override public void onFailure(PersistentMutationsError error) { Log.e("TAG", error.getMutationClassName()); Log.e("TAG", "Error", error.getException()); } })
@Override public void onFailure(@Nonnull ApolloException e) { callBack.onFailure(e); if ( callbackForPersistentMutation != null) { callbackForPersistentMutation.onFailure( new PersistentMutationsError(request.operation.getClass().getSimpleName(), object.recordIdentifier, e)); } appSyncOfflineMutationManager.setInProgressPersistentMutationAsCompleted(object.recordIdentifier); queueHandler.clearPersistentOfflineMutationObjectBeingExecuted(); queueHandler.clearInMemoryOfflineMutationObjectBeingExecuted(); queueHandler.sendEmptyMessage(MessageNumberUtil.FAIL_EXEC); }
callbackForPersistentMutation.onFailure(new PersistentMutationsError( request.operation.getClass().getSimpleName(), object.recordIdentifier, if ( callbackForPersistentMutation != null) { callbackForPersistentMutation.onFailure( new PersistentMutationsError(request.operation.getClass().getSimpleName(), object.recordIdentifier, e));
@Override public void onFailure(PersistentMutationsError error) { Log.e("TAG", error.getMutationClassName()); Log.e("TAG", "Error", error.getException()); } })
@Override public void onResponse(@Nonnull InterceptorResponse response) { callBack.onResponse(response); if ( callbackForPersistentMutation != null) { JSONObject jsonObject; try { jsonObject = new JSONObject(response.clonedBufferString.get()); callbackForPersistentMutation.onResponse(new PersistentMutationsResponse( jsonObject.getJSONObject("data"), jsonObject.getJSONArray("errors"), request.operation.getClass().getSimpleName(), object.recordIdentifier)); } catch (Exception e) { callbackForPersistentMutation.onFailure(new PersistentMutationsError( request.operation.getClass().getSimpleName(), object.recordIdentifier, new ApolloParseException(e.getLocalizedMessage())) ); } } appSyncOfflineMutationManager.setInProgressPersistentMutationAsCompleted(object.recordIdentifier); queueHandler.clearInMemoryOfflineMutationObjectBeingExecuted(); queueHandler.clearPersistentOfflineMutationObjectBeingExecuted(); queueHandler.sendEmptyMessage(MessageNumberUtil.SUCCESSFUL_EXEC); }
@Override public void onFailure(PersistentMutationsError error) { Log.e(TAG, error.getMutationClassName()); Log.e(TAG, "Error", error.getException()); } })
if (callbackForPersistentMutation != null ) { callbackForPersistentMutation.onFailure( new PersistentMutationsError( queueHandler.persistentOfflineMutationObjectBeingExecuted.getClass().getSimpleName(), identifier,
@Override public void onFailure(PersistentMutationsError error) { Log.e(TAG, error.getMutationClassName()); Log.e(TAG, "Error", error.getException()); } })
persistentMutationsCallback.onFailure(new PersistentMutationsError(persistentOfflineMutationObject.responseClassName, persistentOfflineMutationObject.recordIdentifier, new ApolloNetworkException("S3 upload failed.", new IllegalArgumentException("S3ObjectManager not provided.")))); persistentMutationsCallback.onFailure(new PersistentMutationsError(persistentOfflineMutationObject.responseClassName, persistentOfflineMutationObject.recordIdentifier, new ApolloNetworkException("S3 upload failed.", e))); persistentMutationsCallback.onFailure(new PersistentMutationsError(persistentOfflineMutationObject.responseClassName, persistentOfflineMutationObject.recordIdentifier, new ApolloNetworkException("S3 upload failed.", e)));