@lightdash/common 0.1476.0 → 0.1477.0
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/types/errors.d.ts +5 -0
- package/dist/types/errors.js +12 -1
- package/package.json +1 -1
package/dist/types/errors.d.ts
CHANGED
@@ -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 {};
|
package/dist/types/errors.js
CHANGED
@@ -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;
|