UNPKG

@liara/cli

Version:

The command line interface for Liara

18 lines (16 loc) 535 B
import { Errors } from '@oclif/core'; const hooks = { beforeError: [ (error) => { const { response } = error; if (response && response.statusCode === 401) { console.error(new Errors.CLIError(`Authentication failed. Please log in using the 'liara login' command. If you are using an API token for authentication, please consider updating your API token.`).render()); process.exit(2); } return error; }, ], }; export default hooks;