Sha256: fa8ebe583fdc730e1189239195ee8b0ded0abe7a5e50320496f6718e5b96f764
Contents?: true
Size: 625 Bytes
Versions: 26
Compression:
Stored size: 625 Bytes
Contents
'use strict'; var enhanceError = require('./enhanceError'); /** * Create an Error with the specified message, config, error code, request and response. * * @param {string} message The error message. * @param {Object} config The config. * @param {string} [code] The error code (for example, 'ECONNABORTED'). * @param {Object} [request] The request. * @param {Object} [response] The response. * @returns {Error} The created error. */ module.exports = function createError(message, config, code, request, response) { var error = new Error(message); return enhanceError(error, config, code, request, response); };
Version data entries
26 entries across 14 versions & 4 rubygems