mirror of
https://github.com/directus/directus.git
synced 2026-02-03 07:54:59 -05:00
18 lines
340 B
TypeScript
18 lines
340 B
TypeScript
import redent from 'redent';
|
|
|
|
export type CLIError = Error & {
|
|
isAxiosError?: true;
|
|
request?: any;
|
|
response?: any;
|
|
parent?: CLIError;
|
|
code?: string;
|
|
};
|
|
|
|
export class CLIRuntimeError extends Error {
|
|
public readonly code?: string;
|
|
constructor(message: string, code?: string) {
|
|
super(redent(message).trim());
|
|
this.code = code;
|
|
}
|
|
}
|