ToolJet/plugins/packages/common/lib/query.error.ts
Maurits Lourens 60f515d19c
Feature/2395 - add eslint to plugins (#2402)
* merge develop

* Add eslint dependencies, configs and scripts to plugins project

* run lint with Github action

* ignore tests and dist folders

* fun eslint with --fix and manual fixes, renamed __tests_ to __tests__

* add plugins packages folder to lint-staged config

* fix lint issue
2022-03-10 12:29:48 +05:30

25 lines
711 B
TypeScript

export class QueryError extends Error {
data: Record<string, unknown>;
description: any;
constructor(message: string | undefined, description: any, data: Record<string, unknown>) {
super(message);
this.name = this.constructor.name;
this.data = data;
this.description = description;
console.log(this.description);
}
}
export class OAuthUnauthorizedClientError extends Error {
data: Record<string, unknown>;
description: any;
constructor(message: string | undefined, description: any, data: Record<string, unknown>) {
super(message);
this.name = this.constructor.name;
this.data = data;
this.description = description;
console.log(this.description);
}
}