UNPKG

reqman

Version:

Reqman is a tool that can quickly help back-end engineers with api testing, as well as a nodejs-based crawler tool.

16 lines (12 loc) 489 B
const chalk = require('chalk'); /** * @description A function that outputs the wrong log. * @param {Object} result http result * @return {Void} */ function printError(err, queueElement) { console.log(chalk.bold(`${chalk.green(">>>")} [${queueElement.name}] ${chalk.bgGreen(queueElement.options.method)}: ${queueElement.options.url}`)) console.log(chalk.bold(chalk.red('[REQMAN ERROR]: \n\n' + JSON.stringify(err, null, 2)))); console.log("\n"); } module.exports = printError;