|
@ -1,4 +1,5 @@ |
|
|
import ms from 'ms'; |
|
|
import ms from 'ms'; |
|
|
|
|
|
import chalk from 'chalk'; |
|
|
|
|
|
|
|
|
export function handleError (err) { |
|
|
export function handleError (err) { |
|
|
if (403 === err.status) { |
|
|
if (403 === err.status) { |
|
@ -21,5 +22,5 @@ export function handleError (err) { |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
export function error (err) { |
|
|
export function error (err) { |
|
|
console.error(`> \u001b[31mError!\u001b[39m ${err}`); |
|
|
console.error(`> ${chalk.red('Error!')} ${err}`); |
|
|
} |
|
|
} |
|
|