export class CLIError extends Error { } export class UserError extends Error { data: any id: string statusCode?: any constructor(id, data?) { super() if (data === undefined) data = {} this.data = data this.id = id } } export class ServerError extends UserError { error: Error constructor(e) { super('ServerError') this.error = e } }