relay/src/error.ts

13 lines
374 B
TypeScript
Raw Normal View History

2022-07-24 00:24:19 +00:00
import log from "loglevel";
export function errorExit(msg: string): void {
2022-07-24 00:24:19 +00:00
log.error(msg);
process.exit(1);
}
export const ERR_NOT_READY = "NOT_READY";
2022-08-05 03:38:44 +00:00
export const ERR_INVALID_CHAIN = "INVALID_CHAIN";
export const ERR_ENDPOINT_INVALID = "ENDPOINT_INVALID";
export const ERR_METHOD_INVALID = "METHOD_INVALID";
export const ERR_HASH_IS_DIRECTORY = "HASH_IS_DIRECTORY";