@lightdash/common 0.1476.0 → 0.1477.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -129,5 +129,10 @@ export declare class UnexpectedGoogleSheetsError extends LightdashError {
129
129
  [key: string]: AnyType;
130
130
  });
131
131
  }
132
+ export declare class GoogleSheetsTransientError extends LightdashError {
133
+ constructor(message?: string, data?: {
134
+ [key: string]: AnyType;
135
+ });
136
+ }
132
137
  export declare const getErrorMessage: (e: unknown) => string;
133
138
  export {};
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getErrorMessage = exports.UnexpectedGoogleSheetsError = exports.SlackInstallationNotFoundError = exports.KnexPaginationError = exports.NotEnoughResults = exports.MissingConfigError = exports.AlreadyExistsError = exports.AlreadyProcessingError = exports.SmptError = exports.WarehouseQueryError = exports.WarehouseConnectionError = exports.InvalidUser = exports.NotFoundError = exports.DbtError = exports.FieldReferenceError = exports.CompileError = exports.ParseError = exports.UnexpectedDatabaseError = exports.UnexpectedGitError = exports.UnexpectedIndexError = exports.UnexpectedServerError = exports.MissingWarehouseCredentialsError = exports.MissingCatalogEntryError = exports.NonCompiledModelError = exports.ParameterError = exports.ExpiredError = exports.NotExistsError = exports.AuthorizationError = exports.DeactivatedAccountError = exports.ForbiddenError = exports.LightdashError = void 0;
3
+ exports.getErrorMessage = exports.GoogleSheetsTransientError = exports.UnexpectedGoogleSheetsError = exports.SlackInstallationNotFoundError = exports.KnexPaginationError = exports.NotEnoughResults = exports.MissingConfigError = exports.AlreadyExistsError = exports.AlreadyProcessingError = exports.SmptError = exports.WarehouseQueryError = exports.WarehouseConnectionError = exports.InvalidUser = exports.NotFoundError = exports.DbtError = exports.FieldReferenceError = exports.CompileError = exports.ParseError = exports.UnexpectedDatabaseError = exports.UnexpectedGitError = exports.UnexpectedIndexError = exports.UnexpectedServerError = exports.MissingWarehouseCredentialsError = exports.MissingCatalogEntryError = exports.NonCompiledModelError = exports.ParameterError = exports.ExpiredError = exports.NotExistsError = exports.AuthorizationError = exports.DeactivatedAccountError = exports.ForbiddenError = exports.LightdashError = void 0;
4
4
  class LightdashError extends Error {
5
5
  constructor({ message, name, statusCode, data }) {
6
6
  super(message);
@@ -330,5 +330,16 @@ class UnexpectedGoogleSheetsError extends LightdashError {
330
330
  }
331
331
  }
332
332
  exports.UnexpectedGoogleSheetsError = UnexpectedGoogleSheetsError;
333
+ class GoogleSheetsTransientError extends LightdashError {
334
+ constructor(message = 'Unexpected error in Google Sheets API', data = {}) {
335
+ super({
336
+ message,
337
+ name: 'GoogleSheetsTransientError',
338
+ statusCode: 500,
339
+ data,
340
+ });
341
+ }
342
+ }
343
+ exports.GoogleSheetsTransientError = GoogleSheetsTransientError;
333
344
  const getErrorMessage = (e) => e instanceof Error ? e.message : `Unknown ${typeof e} error`;
334
345
  exports.getErrorMessage = getErrorMessage;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lightdash/common",
3
- "version": "0.1476.0",
3
+ "version": "0.1477.0",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "files": [