private boolean shouldSendFailureReason(HttpResponseStatus status, RestServiceException exception) {
    if (status == HttpResponseStatus.BAD_REQUEST || status == HttpResponseStatus.REQUEST_ENTITY_TOO_LARGE
        || exception.shouldIncludeExceptionMessageInResponse()) {
      return true;
    }
    return request != null && request.getArgs().containsKey(RestUtils.InternalKeys.SEND_FAILURE_REASON)
        && (Boolean) request.getArgs().get(RestUtils.InternalKeys.SEND_FAILURE_REASON);
  }
@param status the {@link HttpResponseStatus}
@return {@code true} if the channel should be kept alive
ambry-rest/src/main/java/com/github/ambry/rest/NettyResponseChannel.java