index.js
function getErrorMessage (err, status, env) {
  var msg

  if (env !== 'production') {
    // use err.stack, which typically includes err.message
    msg = err.stack

    // fallback to err.toString() when possible
    if (!msg && typeof err.toString === 'function') {
      msg = err.toString()
    }
  }

  return msg || statuses[status]
}
function getErrorMessage (err, status, env) {
  var msg

  if (env !== 'production') {
    // use err.stack, which typically includes err.message
    msg = err.stack

    // fallback to err.toString() when possible
    if (!msg && typeof err.toString === 'function') {
      msg = err.toString()
    }
  }

  return msg || statuses[status]
}
function getErrorMessage ( err , status , env ) { var msg if ( env !== 'production' ) { // use err.stack, which typically includes err.message msg = err . stack // fallback to err.toString() when possible if ( ! msg && typeof err . toString === 'function' ) { msg = err . toString ( ) } } return msg || statuses [ status ] }
Get message from Error object, fallback to status message.

@param {Error} err
@param {number} status
@param {string} env
@return {string}
@private
Get message from Error object fallback to status message .