Refactor web CLI into focused modules (#1837)
This commit is contained in:
committed by
GitHub
parent
00821700de
commit
45df19c3b2
@@ -0,0 +1,18 @@
|
||||
const EXIT_CODE = {
|
||||
SUCCESS: 0,
|
||||
GENERAL_ERROR: 1,
|
||||
USAGE_ERROR: 2,
|
||||
MISSING_DEPENDENCY: 3,
|
||||
AUTH_CONFIG_ERROR: 4,
|
||||
NETWORK_RUNTIME_ERROR: 5,
|
||||
};
|
||||
|
||||
class TunnelCliError extends Error {
|
||||
constructor(message, exitCode = EXIT_CODE.GENERAL_ERROR) {
|
||||
super(message);
|
||||
this.name = 'TunnelCliError';
|
||||
this.exitCode = exitCode;
|
||||
}
|
||||
}
|
||||
|
||||
export { EXIT_CODE, TunnelCliError };
|
||||
Reference in New Issue
Block a user