<commit_before>module.exports = handler

var debug = require('../debug').server
var fs = require('fs')

function handler (err, req, res, next) {
  debug('Error page because of ' + err.message)

  var ldp = req.app.locals.ldp

  // If the user specifies this function
  // then, they can customize the error programmatically
  if (ldp.errorHandler) {
    return ldp.errorHandler(err, req, res, next)
  }

  // If noErrorPages is set,
  // then use built-in express default error handler
  if (ldp.noErrorPages) {
    return res
      .status(err.status)
      .send(err.message || '')
  }<commit_msg>Add new line after error message<commit_after>module.exports = handler

var debug = require('../debug').server
var fs = require('fs')

function handler (err, req, res, next) {
  debug('Error page because of ' + err.message)

  var ldp = req.app.locals.ldp

  // If the user specifies this function
  // then, they can customize the error programmatically
  if (ldp.errorHandler) {
    return ldp.errorHandler(err, req, res, next)
  }

  // If noErrorPages is set,
  // then use built-in express default error handler
  if (ldp.noErrorPages) {
    return res
      .status(err.status)
      .send(err.message + "\n" || '')
  }
{'fraction_non_alphanumeric': 0.12418300653594772, 'fraction_numerical': 0.0, 'mean_word_length': 3.096989966555184, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '3367113', 'n_tokens_mistral': 396, 'n_tokens_neox': 382, 'n_words': 124}