private void onProcessingFailure(RestRequest restRequest, RestResponseChannel restResponseChannel,
      Exception exception) {
    try {
      restRequest.getMetricsTracker().scalingMetricsTracker.markRequestCompleted();
      restResponseChannel.onResponseComplete(exception);
    } catch (Exception e) {
      metrics.responseCompleteTasksError.inc();
      logger.error("Error during response complete tasks", e);
    }
  }
Triggers an error response.
@param restRequest the {@link RestRequest} for which the response has been completed.
@param restResponseChannel the {@link RestResponseChannel} over which response was sent.
@param exception any {@link Exception} that occurred during response construction.
ambry-rest/src/main/java/com/github/ambry/rest/AsyncRequestResponseHandler.java