private void onErrorResponse(ReplicaId replicaId, RouterException exception, boolean updateDataNodeMetrics) {
    operationTracker.onResponse(replicaId,
        TrackedRequestFinalState.fromRouterErrorCodeToFinalState(exception.getErrorCode()));
    setOperationException(exception);
    routerMetrics.routerRequestErrorCount.inc();
    if (updateDataNodeMetrics) {
      routerMetrics.getDataNodeBasedMetrics(replicaId.getDataNodeId()).getBlobInfoRequestErrorCount.inc();
    }
  }
Perform the necessary actions when a request to a replica fails.
@param replicaId the {@link ReplicaId} associated with the failed response.
@param exception the {@link RouterException} associated with the failed response.
@param updateDataNodeMetrics {@code true} if data node metrics should be updated. {@code false} otherwise.
ambry-router/src/main/java/com/github/ambry/router/GetBlobInfoOperation.java