<commit_before>'use strict'

/**
 * Dependencies
 * @ignore
 */

/**
 * Module Dependencies
 * @ignore
 */
const BaseRequest = require('./BaseRequest')

/**
 * HeartbeatRequest
 * @class
 */
class HeartbeatRequest extends BaseRequest {

  static handle (request, socket, system) {
    let instance = new HeartbeatRequest(request, socket, system)

    return Promise.resolve(instance)
      .then(instance.respond)
      .catch(instance.internalServerError)
  }

  respond (instance) {
    instance.heartbeat()
  }<commit_msg>fix(HeartbeatRequest): fix internal server error handling<commit_after>'use strict'

/**
 * Dependencies
 * @ignore
 */

/**
 * Module Dependencies
 * @ignore
 */
const BaseRequest = require('./BaseRequest')

/**
 * HeartbeatRequest
 * @class
 */
class HeartbeatRequest extends BaseRequest {

  static handle (request, socket, system) {
    let instance = new HeartbeatRequest(request, socket, system)

    return Promise.resolve(instance)
      .then(instance.respond)
      .catch(error => instance.internalServerError(error))
  }

  respond (instance) {
    instance.heartbeat()
  }
{'fraction_non_alphanumeric': 0.12522522522522522, 'fraction_numerical': 0.0, 'mean_word_length': 3.747863247863248, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 4, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5700948', 'n_tokens_mistral': 322, 'n_tokens_neox': 309, 'n_words': 74}