ToolJet/plugins/packages/common/lib/query.error.ts
Akshay 59cf3b1931
Fix: Googlesheets OAuth refresh token flow (#2118)
* implement google sheet oauh token refresh flow

* format lint

* make use of constructor name as instanceof fails

* remove unused import

* force consent to get refresh token on googlesheets ds
2022-02-05 07:09:40 +05:30

25 lines
627 B
TypeScript

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