1 |
|
2 |
|
3 | const colors = require('./detect/colors')
|
4 |
|
5 | module.exports = ({ method, url, reason }) => {
|
6 | if (method && url) {
|
7 | console.error(colors.red('ERROR'), colors.gray(method), colors.gray(url), colors.red('\n\\____'),
|
8 | colors.gray(reason.toString()))
|
9 | } else {
|
10 | console.error(colors.red('ERROR'), colors.gray(reason.toString()))
|
11 | }
|
12 | }
|