@takeshape/errors 11.144.1 → 11.154.2

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.
Files changed (67) hide show
  1. package/package.json +1 -1
  2. package/dist/abort/abort-error.d.ts +0 -6
  3. package/dist/abort/abort-error.js +0 -6
  4. package/dist/abort/user-abort-error.d.ts +0 -4
  5. package/dist/abort/user-abort-error.js +0 -4
  6. package/dist/agent-execution-error.d.ts +0 -6
  7. package/dist/agent-execution-error.js +0 -6
  8. package/dist/api-indexing/index.d.ts +0 -18
  9. package/dist/api-indexing/index.js +0 -32
  10. package/dist/authorization.d.ts +0 -6
  11. package/dist/authorization.js +0 -8
  12. package/dist/bad-data.d.ts +0 -6
  13. package/dist/bad-data.js +0 -8
  14. package/dist/bad-request.d.ts +0 -9
  15. package/dist/bad-request.js +0 -16
  16. package/dist/base-error.d.ts +0 -24
  17. package/dist/base-error.js +0 -17
  18. package/dist/branch-merge-error.d.ts +0 -8
  19. package/dist/branch-merge-error.js +0 -13
  20. package/dist/conflict.d.ts +0 -7
  21. package/dist/conflict.js +0 -10
  22. package/dist/deploy.d.ts +0 -6
  23. package/dist/deploy.js +0 -8
  24. package/dist/directive-mapping-error.d.ts +0 -6
  25. package/dist/directive-mapping-error.js +0 -8
  26. package/dist/download.d.ts +0 -6
  27. package/dist/download.js +0 -8
  28. package/dist/entitlement.d.ts +0 -6
  29. package/dist/entitlement.js +0 -8
  30. package/dist/forbidden.d.ts +0 -7
  31. package/dist/forbidden.js +0 -10
  32. package/dist/generate.d.ts +0 -6
  33. package/dist/generate.js +0 -8
  34. package/dist/guardrails.d.ts +0 -17
  35. package/dist/guardrails.js +0 -22
  36. package/dist/import.d.ts +0 -6
  37. package/dist/import.js +0 -8
  38. package/dist/index.d.ts +0 -32
  39. package/dist/index.js +0 -32
  40. package/dist/invalid-query-error.d.ts +0 -6
  41. package/dist/invalid-query-error.js +0 -8
  42. package/dist/invalid-version.d.ts +0 -6
  43. package/dist/invalid-version.js +0 -8
  44. package/dist/json-validation.d.ts +0 -9
  45. package/dist/json-validation.js +0 -14
  46. package/dist/lock.d.ts +0 -6
  47. package/dist/lock.js +0 -8
  48. package/dist/not-found.d.ts +0 -6
  49. package/dist/not-found.js +0 -8
  50. package/dist/parameter-serialization-error.d.ts +0 -6
  51. package/dist/parameter-serialization-error.js +0 -8
  52. package/dist/payment-method.d.ts +0 -6
  53. package/dist/payment-method.js +0 -8
  54. package/dist/remote-graphql-schema.d.ts +0 -6
  55. package/dist/remote-graphql-schema.js +0 -8
  56. package/dist/schema-build.d.ts +0 -13
  57. package/dist/schema-build.js +0 -13
  58. package/dist/schema-validation.d.ts +0 -12
  59. package/dist/schema-validation.js +0 -14
  60. package/dist/service-provider.d.ts +0 -6
  61. package/dist/service-provider.js +0 -8
  62. package/dist/suspend.d.ts +0 -10
  63. package/dist/suspend.js +0 -10
  64. package/dist/unauthorized.d.ts +0 -6
  65. package/dist/unauthorized.js +0 -8
  66. package/dist/unzip.d.ts +0 -6
  67. package/dist/unzip.js +0 -8
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@takeshape/errors",
3
- "version": "11.144.1",
3
+ "version": "11.154.2",
4
4
  "description": "Custom error objects.",
5
5
  "homepage": "https://www.takeshape.io",
6
6
  "repository": {
@@ -1,6 +0,0 @@
1
- import { BaseError } from '../base-error.ts';
2
- export declare class AbortError extends BaseError {
3
- static code: string;
4
- static statusCode: number;
5
- reportToSentry: boolean;
6
- }
@@ -1,6 +0,0 @@
1
- import { BaseError } from "../base-error.js";
2
- export class AbortError extends BaseError {
3
- static code = 'AbortError';
4
- static statusCode = 499; // Client Closed Request (non-standard, used by nginx)
5
- reportToSentry = false;
6
- }
@@ -1,4 +0,0 @@
1
- import { AbortError } from './abort-error.ts';
2
- export declare class UserAbortError extends AbortError {
3
- static code: string;
4
- }
@@ -1,4 +0,0 @@
1
- import { AbortError } from "./abort-error.js";
2
- export class UserAbortError extends AbortError {
3
- static code = 'UserAbortError';
4
- }
@@ -1,6 +0,0 @@
1
- import { BaseError } from './base-error.ts';
2
- export declare class AgentExecutionError extends BaseError {
3
- static code: string;
4
- static statusCode: number;
5
- reportToSentry: boolean;
6
- }
@@ -1,6 +0,0 @@
1
- import { BaseError } from "./base-error.js";
2
- export class AgentExecutionError extends BaseError {
3
- static code = 'AGENT_EXECUTION_ERROR';
4
- static statusCode = 500;
5
- reportToSentry = false;
6
- }
@@ -1,18 +0,0 @@
1
- export declare class ApiIndexingError extends Error {
2
- static code: string;
3
- code: string;
4
- constructor(message: string);
5
- }
6
- export declare class MissingIndexedShapeError extends ApiIndexingError {
7
- static code: string;
8
- constructor(queryName: string);
9
- }
10
- export declare class InvalidPaginationTypeError extends ApiIndexingError {
11
- static code: string;
12
- constructor(validTypes: string[]);
13
- }
14
- export declare class IndexItemMissingIdError extends ApiIndexingError {
15
- static code: string;
16
- constructor(idFieldName: string);
17
- }
18
- export declare function apiIndexingLogErrorMessage(shapeName: string, error?: Error): string;
@@ -1,32 +0,0 @@
1
- export class ApiIndexingError extends Error {
2
- static code;
3
- code;
4
- constructor(message) {
5
- super(message);
6
- this.code = this.constructor.code;
7
- }
8
- }
9
- export class MissingIndexedShapeError extends ApiIndexingError {
10
- static code = 'MissingIndexedShapeError';
11
- constructor(queryName) {
12
- super(`Could not find indexed shape for ${queryName}. Verify that itemsPath is set correctly.`);
13
- this.name = this.code;
14
- }
15
- }
16
- export class InvalidPaginationTypeError extends ApiIndexingError {
17
- static code = 'InvalidPaginationTypeError';
18
- constructor(validTypes) {
19
- super(`Invalid pagination type. Valid types are ${validTypes.join(', ')}.`);
20
- }
21
- }
22
- export class IndexItemMissingIdError extends ApiIndexingError {
23
- static code = 'IndexItemMissingIdError';
24
- constructor(idFieldName) {
25
- super(`Index item is missing a value for the id field "${idFieldName}". Please make sure that cache.idField is set correctly.`);
26
- }
27
- }
28
- export function apiIndexingLogErrorMessage(shapeName, error) {
29
- return error instanceof ApiIndexingError
30
- ? error.message
31
- : `Failed to index shape "${shapeName}" due to an unexpected error.`;
32
- }
@@ -1,6 +0,0 @@
1
- import { BaseError, type BaseErrorOptions } from './base-error.ts';
2
- export declare class AuthorizationError extends BaseError {
3
- static code: string;
4
- static statusCode: number;
5
- constructor(message?: string, options?: BaseErrorOptions);
6
- }
@@ -1,8 +0,0 @@
1
- import { BaseError } from "./base-error.js";
2
- export class AuthorizationError extends BaseError {
3
- static code = 'AuthorizationError';
4
- static statusCode = 401;
5
- constructor(message = 'Authorization Error', options = {}) {
6
- super(message, options);
7
- }
8
- }
@@ -1,6 +0,0 @@
1
- import { BaseError, type BaseErrorOptions } from './base-error.ts';
2
- export declare class BadDataError extends BaseError {
3
- static code: string;
4
- static statusCode: number;
5
- constructor(message?: string, options?: BaseErrorOptions);
6
- }
package/dist/bad-data.js DELETED
@@ -1,8 +0,0 @@
1
- import { BaseError } from "./base-error.js";
2
- export class BadDataError extends BaseError {
3
- static code = 'BadDataError';
4
- static statusCode = 400;
5
- constructor(message = 'Bad Data', options = {}) {
6
- super(message, options);
7
- }
8
- }
@@ -1,9 +0,0 @@
1
- import { BaseError, type BaseErrorOptions } from './base-error.ts';
2
- export declare class BadRequestError extends BaseError {
3
- static code: string;
4
- static statusCode: number;
5
- data?: Record<string, any>;
6
- constructor(message?: string, data?: Record<string, any>, options?: BaseErrorOptions);
7
- get validation(): any;
8
- get validationMessages(): any;
9
- }
@@ -1,16 +0,0 @@
1
- import { BaseError } from "./base-error.js";
2
- export class BadRequestError extends BaseError {
3
- static code = 'BadRequestError';
4
- static statusCode = 400;
5
- data;
6
- constructor(message = 'Bad Request', data, options = {}) {
7
- super(message, options);
8
- this.data = data;
9
- }
10
- get validation() {
11
- return this.data && (this.data.validation ?? this.data.errors);
12
- }
13
- get validationMessages() {
14
- return this.validation || null;
15
- }
16
- }
@@ -1,24 +0,0 @@
1
- export type BaseErrorExtensions = {
2
- [key: string]: unknown;
3
- http?: {
4
- status: number;
5
- headers?: Record<string, string>;
6
- };
7
- sentry?: {
8
- extras: Record<string, unknown>;
9
- };
10
- };
11
- export type BaseErrorOptions = ErrorOptions & {
12
- extensions?: BaseErrorExtensions;
13
- reportToSentry?: boolean;
14
- };
15
- export declare class BaseError extends Error {
16
- static code: string;
17
- static statusCode: number;
18
- code: string;
19
- statusCode: number;
20
- reportToSentry: boolean;
21
- unmaskError: boolean;
22
- extensions?: BaseErrorExtensions;
23
- constructor(message: string, { cause, ...options }?: BaseErrorOptions);
24
- }
@@ -1,17 +0,0 @@
1
- export class BaseError extends Error {
2
- static code;
3
- static statusCode;
4
- code;
5
- statusCode;
6
- reportToSentry = false;
7
- unmaskError = true;
8
- extensions;
9
- constructor(message, { cause, ...options } = {}) {
10
- super(message, { cause });
11
- this.code = this.constructor.code;
12
- this.name = this.code;
13
- this.statusCode = this.constructor.statusCode;
14
- this.extensions = options.extensions;
15
- this.reportToSentry = options.reportToSentry ?? this.reportToSentry;
16
- }
17
- }
@@ -1,8 +0,0 @@
1
- import { BaseError, type BaseErrorOptions } from './base-error.ts';
2
- export declare class BranchMergeError extends BaseError {
3
- static code: string;
4
- static statusCode: number;
5
- data?: Record<string, any>;
6
- constructor(message?: string, data?: Record<string, any>, options?: BaseErrorOptions);
7
- get errors(): any;
8
- }
@@ -1,13 +0,0 @@
1
- import { BaseError } from "./base-error.js";
2
- export class BranchMergeError extends BaseError {
3
- static code = 'BranchMergeError';
4
- static statusCode = 400;
5
- data;
6
- constructor(message = 'Branch merge error', data, options = {}) {
7
- super(message, options);
8
- this.data = data;
9
- }
10
- get errors() {
11
- return this.data?.errors;
12
- }
13
- }
@@ -1,7 +0,0 @@
1
- import { BaseError, type BaseErrorOptions } from './base-error.ts';
2
- export declare class ConflictError extends BaseError {
3
- static code: string;
4
- static statusCode: number;
5
- data: unknown;
6
- constructor(message?: string, data?: unknown, options?: BaseErrorOptions);
7
- }
package/dist/conflict.js DELETED
@@ -1,10 +0,0 @@
1
- import { BaseError } from "./base-error.js";
2
- export class ConflictError extends BaseError {
3
- static code = 'ConflictError';
4
- static statusCode = 409;
5
- data;
6
- constructor(message = 'Conflict', data, options = {}) {
7
- super(message, options);
8
- this.data = data;
9
- }
10
- }
package/dist/deploy.d.ts DELETED
@@ -1,6 +0,0 @@
1
- import { BaseError, type BaseErrorOptions } from './base-error.ts';
2
- export declare class DeployError extends BaseError {
3
- static code: string;
4
- static statusCode: number;
5
- constructor(message?: string, options?: BaseErrorOptions);
6
- }
package/dist/deploy.js DELETED
@@ -1,8 +0,0 @@
1
- import { BaseError } from "./base-error.js";
2
- export class DeployError extends BaseError {
3
- static code = 'DeployError';
4
- static statusCode = 500;
5
- constructor(message = 'An error occurred while deploying static site', options = {}) {
6
- super(message, options);
7
- }
8
- }
@@ -1,6 +0,0 @@
1
- import { BaseError, type BaseErrorOptions } from './base-error.ts';
2
- export declare class DirectiveMappingError extends BaseError {
3
- static code: string;
4
- static statusCode: number;
5
- constructor(message?: string, options?: BaseErrorOptions);
6
- }
@@ -1,8 +0,0 @@
1
- import { BaseError } from "./base-error.js";
2
- export class DirectiveMappingError extends BaseError {
3
- static code = 'DirectiveMappingError';
4
- static statusCode = 500;
5
- constructor(message = 'An error occurred while running a directive mapping operation', options = {}) {
6
- super(message, options);
7
- }
8
- }
@@ -1,6 +0,0 @@
1
- import { BaseError, type BaseErrorOptions } from './base-error.ts';
2
- export declare class DownloadError extends BaseError {
3
- static code: string;
4
- static statusCode: number;
5
- constructor(message?: string, options?: BaseErrorOptions);
6
- }
package/dist/download.js DELETED
@@ -1,8 +0,0 @@
1
- import { BaseError } from "./base-error.js";
2
- export class DownloadError extends BaseError {
3
- static code = 'DownloadError';
4
- static statusCode = 500;
5
- constructor(message = 'An error occurred while downloading static site', options = {}) {
6
- super(message, options);
7
- }
8
- }
@@ -1,6 +0,0 @@
1
- import { BaseError, type BaseErrorOptions } from './base-error.ts';
2
- export declare class EntitlementError extends BaseError {
3
- static code: string;
4
- static statusCode: number;
5
- constructor(message?: string, options?: BaseErrorOptions);
6
- }
@@ -1,8 +0,0 @@
1
- import { BaseError } from "./base-error.js";
2
- export class EntitlementError extends BaseError {
3
- static code = 'EntitlementError';
4
- static statusCode = 500;
5
- constructor(message = 'Entitlement Error', options = {}) {
6
- super(message, options);
7
- }
8
- }
@@ -1,7 +0,0 @@
1
- import { BaseError, type BaseErrorOptions } from './base-error.ts';
2
- export declare class ForbiddenError extends BaseError {
3
- static code: string;
4
- static statusCode: number;
5
- data: unknown;
6
- constructor(message?: string, data?: unknown, options?: BaseErrorOptions);
7
- }
package/dist/forbidden.js DELETED
@@ -1,10 +0,0 @@
1
- import { BaseError } from "./base-error.js";
2
- export class ForbiddenError extends BaseError {
3
- static code = 'ForbiddenError';
4
- static statusCode = 403;
5
- data;
6
- constructor(message = 'Forbidden Error', data, options = {}) {
7
- super(message, options);
8
- this.data = data;
9
- }
10
- }
@@ -1,6 +0,0 @@
1
- import { BaseError, type BaseErrorOptions } from './base-error.ts';
2
- export declare class GenerateError extends BaseError {
3
- static code: string;
4
- static statusCode: number;
5
- constructor(message?: string, options?: BaseErrorOptions);
6
- }
package/dist/generate.js DELETED
@@ -1,8 +0,0 @@
1
- import { BaseError } from "./base-error.js";
2
- export class GenerateError extends BaseError {
3
- static code = 'GenerateError';
4
- static statusCode = 500;
5
- constructor(message = 'An error occurred while generating static site', options = {}) {
6
- super(message, options);
7
- }
8
- }
@@ -1,17 +0,0 @@
1
- import { BaseError } from './base-error.ts';
2
- export declare enum GuardrailErrorCode {
3
- GeneralError = "GENERAL_ERROR",
4
- InvalidData = "INVALID_DATA",
5
- InvalidResponse = "INVALID_RESPONSE",
6
- SchemaError = "SCHEMA_ERROR",
7
- SchemaVersionMismatch = "SCHEMA_VERSION_MISMATCH",
8
- NotEntitled = "NOT_ENTITLED"
9
- }
10
- export type GuardrailErrorOptions = {
11
- reportToSentry?: boolean;
12
- code: GuardrailErrorCode;
13
- originalError?: unknown;
14
- };
15
- export declare class GuardrailError extends BaseError {
16
- constructor(message?: string, options?: GuardrailErrorOptions);
17
- }
@@ -1,22 +0,0 @@
1
- import { BaseError } from "./base-error.js";
2
- export var GuardrailErrorCode;
3
- (function (GuardrailErrorCode) {
4
- GuardrailErrorCode["GeneralError"] = "GENERAL_ERROR";
5
- GuardrailErrorCode["InvalidData"] = "INVALID_DATA";
6
- GuardrailErrorCode["InvalidResponse"] = "INVALID_RESPONSE";
7
- GuardrailErrorCode["SchemaError"] = "SCHEMA_ERROR";
8
- GuardrailErrorCode["SchemaVersionMismatch"] = "SCHEMA_VERSION_MISMATCH";
9
- GuardrailErrorCode["NotEntitled"] = "NOT_ENTITLED";
10
- })(GuardrailErrorCode || (GuardrailErrorCode = {}));
11
- export class GuardrailError extends BaseError {
12
- constructor(message = 'Guardrail error.', options = { code: GuardrailErrorCode.GeneralError }) {
13
- const { code, reportToSentry, originalError } = options;
14
- super(message, {
15
- reportToSentry,
16
- extensions: {
17
- code,
18
- originalError
19
- }
20
- });
21
- }
22
- }
package/dist/import.d.ts DELETED
@@ -1,6 +0,0 @@
1
- import { BaseError, type BaseErrorOptions } from './base-error.ts';
2
- export declare class ImportError extends BaseError {
3
- static code: string;
4
- static statusCode: number;
5
- constructor(message?: string, options?: BaseErrorOptions);
6
- }
package/dist/import.js DELETED
@@ -1,8 +0,0 @@
1
- import { BaseError } from "./base-error.js";
2
- export class ImportError extends BaseError {
3
- static code = 'ImportError';
4
- static statusCode = 500;
5
- constructor(message = 'Unable to import the project', options = {}) {
6
- super(message, options);
7
- }
8
- }
package/dist/index.d.ts DELETED
@@ -1,32 +0,0 @@
1
- export * from './abort/abort-error.ts';
2
- export * from './abort/user-abort-error.ts';
3
- export * from './agent-execution-error.ts';
4
- export * from './api-indexing/index.ts';
5
- export * from './authorization.ts';
6
- export * from './bad-data.ts';
7
- export * from './bad-request.ts';
8
- export * from './base-error.ts';
9
- export * from './branch-merge-error.ts';
10
- export * from './conflict.ts';
11
- export * from './deploy.ts';
12
- export * from './directive-mapping-error.ts';
13
- export * from './download.ts';
14
- export * from './entitlement.ts';
15
- export * from './forbidden.ts';
16
- export * from './generate.ts';
17
- export * from './guardrails.ts';
18
- export * from './import.ts';
19
- export * from './invalid-query-error.ts';
20
- export * from './invalid-version.ts';
21
- export * from './json-validation.ts';
22
- export * from './lock.ts';
23
- export * from './not-found.ts';
24
- export * from './parameter-serialization-error.ts';
25
- export * from './payment-method.ts';
26
- export * from './remote-graphql-schema.ts';
27
- export * from './schema-build.ts';
28
- export * from './schema-validation.ts';
29
- export * from './service-provider.ts';
30
- export * from './suspend.ts';
31
- export * from './unauthorized.ts';
32
- export * from './unzip.ts';
package/dist/index.js DELETED
@@ -1,32 +0,0 @@
1
- export * from "./abort/abort-error.js";
2
- export * from "./abort/user-abort-error.js";
3
- export * from "./agent-execution-error.js";
4
- export * from "./api-indexing/index.js";
5
- export * from "./authorization.js";
6
- export * from "./bad-data.js";
7
- export * from "./bad-request.js";
8
- export * from "./base-error.js";
9
- export * from "./branch-merge-error.js";
10
- export * from "./conflict.js";
11
- export * from "./deploy.js";
12
- export * from "./directive-mapping-error.js";
13
- export * from "./download.js";
14
- export * from "./entitlement.js";
15
- export * from "./forbidden.js";
16
- export * from "./generate.js";
17
- export * from "./guardrails.js";
18
- export * from "./import.js";
19
- export * from "./invalid-query-error.js";
20
- export * from "./invalid-version.js";
21
- export * from "./json-validation.js";
22
- export * from "./lock.js";
23
- export * from "./not-found.js";
24
- export * from "./parameter-serialization-error.js";
25
- export * from "./payment-method.js";
26
- export * from "./remote-graphql-schema.js";
27
- export * from "./schema-build.js";
28
- export * from "./schema-validation.js";
29
- export * from "./service-provider.js";
30
- export * from "./suspend.js";
31
- export * from "./unauthorized.js";
32
- export * from "./unzip.js";
@@ -1,6 +0,0 @@
1
- import { BaseError, type BaseErrorOptions } from './base-error.ts';
2
- export declare class InvalidQueryError extends BaseError {
3
- static code: string;
4
- static statusCode: number;
5
- constructor(message?: string, options?: BaseErrorOptions);
6
- }
@@ -1,8 +0,0 @@
1
- import { BaseError } from "./base-error.js";
2
- export class InvalidQueryError extends BaseError {
3
- static code = 'InvalidQueryError';
4
- static statusCode = 400;
5
- constructor(message = 'Invalid Query', options = {}) {
6
- super(message, options);
7
- }
8
- }
@@ -1,6 +0,0 @@
1
- import { BaseError, type BaseErrorOptions } from './base-error.ts';
2
- export declare class InvalidVersionError extends BaseError {
3
- static code: string;
4
- static statusCode: number;
5
- constructor(message?: string, options?: BaseErrorOptions);
6
- }
@@ -1,8 +0,0 @@
1
- import { BaseError } from "./base-error.js";
2
- export class InvalidVersionError extends BaseError {
3
- static code = 'InvalidVersionError';
4
- static statusCode = 409;
5
- constructor(message = 'Invalid version', options = {}) {
6
- super(message, options);
7
- }
8
- }
@@ -1,9 +0,0 @@
1
- import type { ErrorObject } from 'ajv';
2
- import { BaseError, type BaseErrorOptions } from './base-error.ts';
3
- export type JSONValidationErrorObject = ErrorObject;
4
- export declare class JSONValidationError extends BaseError {
5
- static code: string;
6
- static statusCode: number;
7
- errors: JSONValidationErrorObject[];
8
- constructor(message?: string, errors?: JSONValidationErrorObject[] | null, options?: BaseErrorOptions);
9
- }
@@ -1,14 +0,0 @@
1
- import { BaseError } from "./base-error.js";
2
- export class JSONValidationError extends BaseError {
3
- static code = 'JSONValidationError';
4
- static statusCode = 400;
5
- errors;
6
- constructor(message = 'A validation error occurred', errors, options = {}) {
7
- super(message, options);
8
- this.errors = errors ?? [];
9
- this.extensions = {
10
- ...this.extensions,
11
- validationErrors: errors
12
- };
13
- }
14
- }
package/dist/lock.d.ts DELETED
@@ -1,6 +0,0 @@
1
- import { BaseError, type BaseErrorOptions } from './base-error.ts';
2
- export declare class LockError extends BaseError {
3
- static code: string;
4
- static statusCode: number;
5
- constructor(message?: string, options?: BaseErrorOptions);
6
- }
package/dist/lock.js DELETED
@@ -1,8 +0,0 @@
1
- import { BaseError } from "./base-error.js";
2
- export class LockError extends BaseError {
3
- static code = 'LockError';
4
- static statusCode = 423;
5
- constructor(message = 'Unable to write to resource because it is locked.', options = {}) {
6
- super(message, options);
7
- }
8
- }
@@ -1,6 +0,0 @@
1
- import { BaseError, type BaseErrorOptions } from './base-error.ts';
2
- export declare class NotFoundError extends BaseError {
3
- static code: string;
4
- static statusCode: number;
5
- constructor(message?: string, options?: BaseErrorOptions);
6
- }
package/dist/not-found.js DELETED
@@ -1,8 +0,0 @@
1
- import { BaseError } from "./base-error.js";
2
- export class NotFoundError extends BaseError {
3
- static code = 'NotFoundError';
4
- static statusCode = 404;
5
- constructor(message = 'Not Found', options = {}) {
6
- super(message, options);
7
- }
8
- }
@@ -1,6 +0,0 @@
1
- import { BaseError, type BaseErrorOptions } from './base-error.ts';
2
- export declare class ParameterSerializationError extends BaseError {
3
- static code: string;
4
- static statusCode: number;
5
- constructor(message?: string, options?: BaseErrorOptions);
6
- }
@@ -1,8 +0,0 @@
1
- import { BaseError } from "./base-error.js";
2
- export class ParameterSerializationError extends BaseError {
3
- static code = 'ParameterSerializationError';
4
- static statusCode = 500;
5
- constructor(message = 'Error serializing the parameters', options = {}) {
6
- super(message, options);
7
- }
8
- }
@@ -1,6 +0,0 @@
1
- import { BaseError, type BaseErrorOptions } from './base-error.ts';
2
- export declare class PaymentMethodError extends BaseError {
3
- static code: string;
4
- static statusCode: number;
5
- constructor(message?: string, options?: BaseErrorOptions);
6
- }
@@ -1,8 +0,0 @@
1
- import { BaseError } from "./base-error.js";
2
- export class PaymentMethodError extends BaseError {
3
- static code = 'PaymentMethodError';
4
- static statusCode = 500;
5
- constructor(message = 'Payment Method Error', options = {}) {
6
- super(message, options);
7
- }
8
- }
@@ -1,6 +0,0 @@
1
- import { BaseError, type BaseErrorOptions } from './base-error.ts';
2
- export declare class RemoteGraphQLSchemaError extends BaseError {
3
- static code: string;
4
- static statusCode: number;
5
- constructor(message?: string, options?: BaseErrorOptions);
6
- }
@@ -1,8 +0,0 @@
1
- import { BaseError } from "./base-error.js";
2
- export class RemoteGraphQLSchemaError extends BaseError {
3
- static code = 'RemoteGraphQLSchemaError';
4
- static statusCode = 400;
5
- constructor(message = 'Error getting remote GraphQL schema', options = {}) {
6
- super(message, options);
7
- }
8
- }
@@ -1,13 +0,0 @@
1
- import { BaseError, type BaseErrorOptions } from './base-error.ts';
2
- type SchemaBuildErrorOptions = {
3
- cause?: Error;
4
- schema?: unknown;
5
- };
6
- export declare class SchemaBuildError extends BaseError {
7
- static code: string;
8
- static statusCode: number;
9
- schema?: unknown;
10
- cause?: Error;
11
- constructor(message?: string, { cause, schema, ...options }?: BaseErrorOptions & SchemaBuildErrorOptions);
12
- }
13
- export {};
@@ -1,13 +0,0 @@
1
- import { BaseError } from "./base-error.js";
2
- export class SchemaBuildError extends BaseError {
3
- static code = 'SchemaBuildError';
4
- static statusCode = 400;
5
- schema;
6
- cause;
7
- constructor(message = 'An error occurred while building the schema', { cause, schema, ...options } = {}) {
8
- super(message, options);
9
- this.schema = schema;
10
- this.cause = cause;
11
- this.stack = cause?.stack;
12
- }
13
- }
@@ -1,12 +0,0 @@
1
- import { BaseError, type BaseErrorOptions } from './base-error.ts';
2
- export type SchemaValidationErrorItem = {
3
- path: Array<string | number>;
4
- type: 'conflict' | 'json' | 'invalidVersion' | 'notFound' | 'undefined' | 'tooMany' | 'location' | 'entitlement';
5
- message: string;
6
- };
7
- export declare class SchemaValidationError extends BaseError {
8
- static code: string;
9
- static statusCode: number;
10
- errors: SchemaValidationErrorItem[];
11
- constructor(message?: string, errors?: SchemaValidationErrorItem[], options?: BaseErrorOptions);
12
- }
@@ -1,14 +0,0 @@
1
- import { BaseError } from "./base-error.js";
2
- export class SchemaValidationError extends BaseError {
3
- static code = 'SchemaValidationError';
4
- static statusCode = 400;
5
- errors;
6
- constructor(message = 'A validation error occurred', errors = [], options = {}) {
7
- super(message, options);
8
- this.errors = errors;
9
- this.extensions = {
10
- ...this.extensions,
11
- validationErrors: errors
12
- };
13
- }
14
- }
@@ -1,6 +0,0 @@
1
- import { BaseError, type BaseErrorOptions } from './base-error.ts';
2
- export declare class ServiceProviderError extends BaseError {
3
- static code: string;
4
- static statusCode: number;
5
- constructor(message?: string, options?: BaseErrorOptions);
6
- }
@@ -1,8 +0,0 @@
1
- import { BaseError } from "./base-error.js";
2
- export class ServiceProviderError extends BaseError {
3
- static code = 'ServiceProviderError';
4
- static statusCode = 500;
5
- constructor(message = 'Bad service provider', options = {}) {
6
- super(message, options);
7
- }
8
- }
package/dist/suspend.d.ts DELETED
@@ -1,10 +0,0 @@
1
- import { BaseError, type BaseErrorOptions } from './base-error.ts';
2
- export type SuspendJobPayload = {
3
- waitingFor: string;
4
- };
5
- export declare class SuspendJob extends BaseError {
6
- static code: string;
7
- static statusCode: number;
8
- payload: SuspendJobPayload;
9
- constructor(message: string, payload: SuspendJobPayload, options?: BaseErrorOptions);
10
- }
package/dist/suspend.js DELETED
@@ -1,10 +0,0 @@
1
- import { BaseError } from "./base-error.js";
2
- export class SuspendJob extends BaseError {
3
- static code = 'SuspendJob';
4
- static statusCode = 418;
5
- payload;
6
- constructor(message, payload, options = {}) {
7
- super(message, options);
8
- this.payload = payload;
9
- }
10
- }
@@ -1,6 +0,0 @@
1
- import { BaseError, type BaseErrorOptions } from './base-error.ts';
2
- export declare class UnauthorizedError extends BaseError {
3
- static code: string;
4
- static statusCode: number;
5
- constructor(message?: string, options?: BaseErrorOptions);
6
- }
@@ -1,8 +0,0 @@
1
- import { BaseError } from "./base-error.js";
2
- export class UnauthorizedError extends BaseError {
3
- static code = 'UnauthorizedError';
4
- static statusCode = 401;
5
- constructor(message = 'Unauthorized Error', options = {}) {
6
- super(message, options);
7
- }
8
- }
package/dist/unzip.d.ts DELETED
@@ -1,6 +0,0 @@
1
- import { BaseError, type BaseErrorOptions } from './base-error.ts';
2
- export declare class UnzipError extends BaseError {
3
- static code: string;
4
- static statusCode: number;
5
- constructor(message?: string, options?: BaseErrorOptions);
6
- }
package/dist/unzip.js DELETED
@@ -1,8 +0,0 @@
1
- import { BaseError } from "./base-error.js";
2
- export class UnzipError extends BaseError {
3
- static code = 'UnzipError';
4
- static statusCode = 500;
5
- constructor(message = 'An error occurred while unzipping static site', options = {}) {
6
- super(message, options);
7
- }
8
- }