@constructive-io/errors 0.13.0 → 0.14.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.
- package/esm/generated/registry.generated.d.ts +3 -3
- package/esm/generated/registry.generated.js +15 -3
- package/esm/registry.d.ts +9 -0
- package/esm/registry.js +18 -0
- package/generated/registry.generated.d.ts +3 -3
- package/generated/registry.generated.js +15 -3
- package/package.json +2 -2
- package/registry.d.ts +9 -0
- package/registry.js +18 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* GENERATED FILE — DO NOT EDIT BY HAND.
|
|
3
3
|
*
|
|
4
|
-
* Source of truth: the constructive-db error audit (
|
|
4
|
+
* Source of truth: the constructive-db error audit (784 distinct codes
|
|
5
5
|
* raised via EXCEPTION/THROW across deploy sources + generated output).
|
|
6
6
|
* Regenerate with `python3 scripts/generate-registry.py` (see README.md).
|
|
7
7
|
*
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
* codes carry their raw message (with %-args rendered as {{argN}}). Curated
|
|
10
10
|
* entries in `registry.ts` override anything here (typed context + refined copy).
|
|
11
11
|
*
|
|
12
|
-
* Counts:
|
|
12
|
+
* Counts: 784 total, 576 public, 208 internal.
|
|
13
13
|
*/
|
|
14
14
|
import { type DefinedError } from '../define';
|
|
15
15
|
import type { ErrorContext } from '../types';
|
|
@@ -24,4 +24,4 @@ export declare const generatedRegistry: Record<string, DefinedError<ErrorContext
|
|
|
24
24
|
/** Audit metadata for each generated code. */
|
|
25
25
|
export declare const GENERATED_CODE_META: Record<string, GeneratedCodeMeta>;
|
|
26
26
|
/** Total number of codes collected from constructive-db. */
|
|
27
|
-
export declare const GENERATED_CODE_COUNT =
|
|
27
|
+
export declare const GENERATED_CODE_COUNT = 784;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
/**
|
|
3
3
|
* GENERATED FILE — DO NOT EDIT BY HAND.
|
|
4
4
|
*
|
|
5
|
-
* Source of truth: the constructive-db error audit (
|
|
5
|
+
* Source of truth: the constructive-db error audit (784 distinct codes
|
|
6
6
|
* raised via EXCEPTION/THROW across deploy sources + generated output).
|
|
7
7
|
* Regenerate with `python3 scripts/generate-registry.py` (see README.md).
|
|
8
8
|
*
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
* codes carry their raw message (with %-args rendered as {{argN}}). Curated
|
|
11
11
|
* entries in `registry.ts` override anything here (typed context + refined copy).
|
|
12
12
|
*
|
|
13
|
-
* Counts:
|
|
13
|
+
* Counts: 784 total, 576 public, 208 internal.
|
|
14
14
|
*/
|
|
15
15
|
import { defineError } from '../define';
|
|
16
16
|
/** Every constructive-db error code, keyed by code. */
|
|
@@ -134,6 +134,7 @@ export const generatedRegistry = {
|
|
|
134
134
|
'CONTENT_PRESET_NOT_SAVED': defineError({ code: 'CONTENT_PRESET_NOT_SAVED', class: 'public', http: 400, message: 'Content preset not saved.' }),
|
|
135
135
|
'COPY_TEMPLATE_TO_BLUEPRINT': defineError({ code: 'COPY_TEMPLATE_TO_BLUEPRINT', class: 'internal', http: 500, message: 'Copy template to blueprint.' }),
|
|
136
136
|
'CREDENTIAL_NOT_EXCHANGEABLE': defineError({ code: 'CREDENTIAL_NOT_EXCHANGEABLE', class: 'public', http: 400, message: 'Credential not exchangeable.' }),
|
|
137
|
+
'CREDENTIAL_NOT_EXTENDABLE': defineError({ code: 'CREDENTIAL_NOT_EXTENDABLE', class: 'public', http: 400, message: 'Credential not extendable.' }),
|
|
137
138
|
'CREDIT_CODE_EXPIRED': defineError({ code: 'CREDIT_CODE_EXPIRED', class: 'internal', http: 500, message: 'Credit code expired.' }),
|
|
138
139
|
'CREDIT_CODE_MAX_REDEMPTIONS_REACHED': defineError({ code: 'CREDIT_CODE_MAX_REDEMPTIONS_REACHED', class: 'internal', http: 500, message: 'Credit code max redemptions reached.' }),
|
|
139
140
|
'CREDIT_CODE_NOT_FOUND': defineError({ code: 'CREDIT_CODE_NOT_FOUND', class: 'internal', http: 500, message: 'Credit code not found.' }),
|
|
@@ -534,6 +535,7 @@ export const generatedRegistry = {
|
|
|
534
535
|
'MODULES_HASH_DUPLICATE_ENTRY': defineError({ code: 'MODULES_HASH_DUPLICATE_ENTRY', class: 'internal', http: 500, message: 'Modules hash duplicate entry.' }),
|
|
535
536
|
'MODULES_HASH_INVALID_ENTRY': defineError({ code: 'MODULES_HASH_INVALID_ENTRY', class: 'internal', http: 500, message: 'Modules hash invalid entry.' }),
|
|
536
537
|
'MODULES_HASH_INVALID_INPUT': defineError({ code: 'MODULES_HASH_INVALID_INPUT', class: 'internal', http: 500, message: 'Modules hash invalid input.' }),
|
|
538
|
+
'MODULE_ENTRY_MALFORMED': defineError({ code: 'MODULE_ENTRY_MALFORMED', class: 'internal', http: 500, message: 'Module entry malformed.' }),
|
|
537
539
|
'MODULE_SECURITY_POLICY_ENTRY_MISSING_TYPE': defineError({ code: 'MODULE_SECURITY_POLICY_ENTRY_MISSING_TYPE', class: 'public', http: 400, message: 'Module security policy entry missing type.' }),
|
|
538
540
|
'MODULE_TABLE_ALREADY_ATTRIBUTED': defineError({ code: 'MODULE_TABLE_ALREADY_ATTRIBUTED', class: 'internal', http: 500, message: 'Module table already attributed.' }),
|
|
539
541
|
'MONOTONIC_FIELD': defineError({ code: 'MONOTONIC_FIELD', class: 'internal', http: 500, message: 'Monotonic field.' }),
|
|
@@ -600,6 +602,7 @@ export const generatedRegistry = {
|
|
|
600
602
|
'PROVISION_INDEX_COLUMNS_REQUIRED': defineError({ code: 'PROVISION_INDEX_COLUMNS_REQUIRED', class: 'internal', http: 500, message: 'Provision index columns required.' }),
|
|
601
603
|
'PROVISION_INDEX_FIELD_NOT_FOUND': defineError({ code: 'PROVISION_INDEX_FIELD_NOT_FOUND', class: 'internal', http: 500, message: 'Provision index field not found.' }),
|
|
602
604
|
'PROVISION_INVALID_DATABASE_ID': defineError({ code: 'PROVISION_INVALID_DATABASE_ID', class: 'internal', http: 500, message: 'Provision invalid database id.' }),
|
|
605
|
+
'PROVISION_PRIVATE_API_NAME_FORBIDDEN': defineError({ code: 'PROVISION_PRIVATE_API_NAME_FORBIDDEN', class: 'public', http: 403, message: 'Provision private api name forbidden.' }),
|
|
603
606
|
'PROVISION_RELATION': defineError({ code: 'PROVISION_RELATION', class: 'internal', http: 500, message: 'Provision relation.' }),
|
|
604
607
|
'PROVISION_TABLE': defineError({ code: 'PROVISION_TABLE', class: 'internal', http: 500, message: 'Provision table.' }),
|
|
605
608
|
'PROVISION_UNIQUE_CONSTRAINT': defineError({ code: 'PROVISION_UNIQUE_CONSTRAINT', class: 'internal', http: 500, message: 'Provision unique constraint.' }),
|
|
@@ -745,6 +748,8 @@ export const generatedRegistry = {
|
|
|
745
748
|
'SUBDOMAIN_LABEL_EXHAUSTED': defineError({ code: 'SUBDOMAIN_LABEL_EXHAUSTED', class: 'public', http: 400, message: 'Subdomain label exhausted.' }),
|
|
746
749
|
'SUBDOMAIN_LABEL_INVALID': defineError({ code: 'SUBDOMAIN_LABEL_INVALID', class: 'public', http: 400, message: 'Subdomain label invalid.' }),
|
|
747
750
|
'SUPER_CONSTRUCTIVE_REQUIRED': defineError({ code: 'SUPER_CONSTRUCTIVE_REQUIRED', class: 'public', http: 400, message: 'Super constructive required.' }),
|
|
751
|
+
'SUSPENSION_FORBIDDEN': defineError({ code: 'SUSPENSION_FORBIDDEN', class: 'public', http: 403, message: 'Suspension forbidden.' }),
|
|
752
|
+
'SUSPENSION_REASON_INVALID': defineError({ code: 'SUSPENSION_REASON_INVALID', class: 'public', http: 400, message: 'Suspension reason invalid.' }),
|
|
748
753
|
'TABLE_MODULE': defineError({ code: 'TABLE_MODULE', class: 'internal', http: 500, message: 'Table module.' }),
|
|
749
754
|
'TABLE_MODULE_TABLE_NOT_FOUND': defineError({ code: 'TABLE_MODULE_TABLE_NOT_FOUND', class: 'internal', http: 500, message: 'Table module table not found.' }),
|
|
750
755
|
'TARGET_EMAILS_NOT_FOUND': defineError({ code: 'TARGET_EMAILS_NOT_FOUND', class: 'internal', http: 500, message: 'Target emails not found.' }),
|
|
@@ -767,6 +772,7 @@ export const generatedRegistry = {
|
|
|
767
772
|
'TRIGGER_NOT_TRANSPILABLE': defineError({ code: 'TRIGGER_NOT_TRANSPILABLE', class: 'public', http: 400, message: 'Trigger not transpilable.' }),
|
|
768
773
|
'TRIGGER_WHEN_AST_INVALID': defineError({ code: 'TRIGGER_WHEN_AST_INVALID', class: 'public', http: 400, message: 'Trigger when ast invalid.' }),
|
|
769
774
|
'TRIGGER_WHEN_AST_ROW_UNAVAILABLE': defineError({ code: 'TRIGGER_WHEN_AST_ROW_UNAVAILABLE', class: 'public', http: 400, message: 'Trigger when ast row unavailable.' }),
|
|
775
|
+
'TRUST_LADDER_OPTION_INVALID': defineError({ code: 'TRUST_LADDER_OPTION_INVALID', class: 'internal', http: 500, message: 'Trust ladder option invalid.' }),
|
|
770
776
|
'UNAUTHENTICATED': defineError({ code: 'UNAUTHENTICATED', class: 'public', http: 401, message: 'Unauthenticated.' }),
|
|
771
777
|
'UNKNOWN_POLICY_TYPE': defineError({ code: 'UNKNOWN_POLICY_TYPE', class: 'public', http: 400, message: 'Unknown policy type.' }),
|
|
772
778
|
'UNKNOWN_VIEW_TYPE': defineError({ code: 'UNKNOWN_VIEW_TYPE', class: 'public', http: 400, message: 'Unknown view type.', positional: ['arg0'] }),
|
|
@@ -915,6 +921,7 @@ export const GENERATED_CODE_META = {
|
|
|
915
921
|
'CONTENT_PRESET_NOT_SAVED': { class: 'public', dynamic: false, generatedOnly: false },
|
|
916
922
|
'COPY_TEMPLATE_TO_BLUEPRINT': { class: 'internal', dynamic: false, generatedOnly: false },
|
|
917
923
|
'CREDENTIAL_NOT_EXCHANGEABLE': { class: 'public', dynamic: false, generatedOnly: true },
|
|
924
|
+
'CREDENTIAL_NOT_EXTENDABLE': { class: 'public', dynamic: false, generatedOnly: false },
|
|
918
925
|
'CREDIT_CODE_EXPIRED': { class: 'internal', dynamic: false, generatedOnly: false },
|
|
919
926
|
'CREDIT_CODE_MAX_REDEMPTIONS_REACHED': { class: 'internal', dynamic: false, generatedOnly: false },
|
|
920
927
|
'CREDIT_CODE_NOT_FOUND': { class: 'internal', dynamic: false, generatedOnly: false },
|
|
@@ -1315,6 +1322,7 @@ export const GENERATED_CODE_META = {
|
|
|
1315
1322
|
'MODULES_HASH_DUPLICATE_ENTRY': { class: 'internal', dynamic: false, generatedOnly: false },
|
|
1316
1323
|
'MODULES_HASH_INVALID_ENTRY': { class: 'internal', dynamic: false, generatedOnly: false },
|
|
1317
1324
|
'MODULES_HASH_INVALID_INPUT': { class: 'internal', dynamic: false, generatedOnly: false },
|
|
1325
|
+
'MODULE_ENTRY_MALFORMED': { class: 'internal', dynamic: false, generatedOnly: false },
|
|
1318
1326
|
'MODULE_SECURITY_POLICY_ENTRY_MISSING_TYPE': { class: 'public', dynamic: false, generatedOnly: false },
|
|
1319
1327
|
'MODULE_TABLE_ALREADY_ATTRIBUTED': { class: 'internal', dynamic: false, generatedOnly: false },
|
|
1320
1328
|
'MONOTONIC_FIELD': { class: 'internal', dynamic: false, generatedOnly: true },
|
|
@@ -1381,6 +1389,7 @@ export const GENERATED_CODE_META = {
|
|
|
1381
1389
|
'PROVISION_INDEX_COLUMNS_REQUIRED': { class: 'internal', dynamic: false, generatedOnly: false },
|
|
1382
1390
|
'PROVISION_INDEX_FIELD_NOT_FOUND': { class: 'internal', dynamic: false, generatedOnly: false },
|
|
1383
1391
|
'PROVISION_INVALID_DATABASE_ID': { class: 'internal', dynamic: false, generatedOnly: false },
|
|
1392
|
+
'PROVISION_PRIVATE_API_NAME_FORBIDDEN': { class: 'public', dynamic: false, generatedOnly: false },
|
|
1384
1393
|
'PROVISION_RELATION': { class: 'internal', dynamic: false, generatedOnly: false },
|
|
1385
1394
|
'PROVISION_TABLE': { class: 'internal', dynamic: false, generatedOnly: false },
|
|
1386
1395
|
'PROVISION_UNIQUE_CONSTRAINT': { class: 'internal', dynamic: false, generatedOnly: false },
|
|
@@ -1526,6 +1535,8 @@ export const GENERATED_CODE_META = {
|
|
|
1526
1535
|
'SUBDOMAIN_LABEL_EXHAUSTED': { class: 'public', dynamic: false, generatedOnly: false },
|
|
1527
1536
|
'SUBDOMAIN_LABEL_INVALID': { class: 'public', dynamic: false, generatedOnly: false },
|
|
1528
1537
|
'SUPER_CONSTRUCTIVE_REQUIRED': { class: 'public', dynamic: false, generatedOnly: false },
|
|
1538
|
+
'SUSPENSION_FORBIDDEN': { class: 'public', dynamic: false, generatedOnly: false },
|
|
1539
|
+
'SUSPENSION_REASON_INVALID': { class: 'public', dynamic: false, generatedOnly: false },
|
|
1529
1540
|
'TABLE_MODULE': { class: 'internal', dynamic: false, generatedOnly: false },
|
|
1530
1541
|
'TABLE_MODULE_TABLE_NOT_FOUND': { class: 'internal', dynamic: false, generatedOnly: false },
|
|
1531
1542
|
'TARGET_EMAILS_NOT_FOUND': { class: 'internal', dynamic: false, generatedOnly: false },
|
|
@@ -1548,6 +1559,7 @@ export const GENERATED_CODE_META = {
|
|
|
1548
1559
|
'TRIGGER_NOT_TRANSPILABLE': { class: 'public', dynamic: false, generatedOnly: false },
|
|
1549
1560
|
'TRIGGER_WHEN_AST_INVALID': { class: 'public', dynamic: false, generatedOnly: false },
|
|
1550
1561
|
'TRIGGER_WHEN_AST_ROW_UNAVAILABLE': { class: 'public', dynamic: false, generatedOnly: false },
|
|
1562
|
+
'TRUST_LADDER_OPTION_INVALID': { class: 'internal', dynamic: false, generatedOnly: false },
|
|
1551
1563
|
'UNAUTHENTICATED': { class: 'public', dynamic: false, generatedOnly: false },
|
|
1552
1564
|
'UNKNOWN_POLICY_TYPE': { class: 'public', dynamic: false, generatedOnly: false },
|
|
1553
1565
|
'UNKNOWN_VIEW_TYPE': { class: 'public', dynamic: true, generatedOnly: false },
|
|
@@ -1576,4 +1588,4 @@ export const GENERATED_CODE_META = {
|
|
|
1576
1588
|
'WITH_CHECK_NOT_ALLOWED': { class: 'public', dynamic: false, generatedOnly: false },
|
|
1577
1589
|
};
|
|
1578
1590
|
/** Total number of codes collected from constructive-db. */
|
|
1579
|
-
export const GENERATED_CODE_COUNT =
|
|
1591
|
+
export const GENERATED_CODE_COUNT = 784;
|
package/esm/registry.d.ts
CHANGED
|
@@ -48,6 +48,15 @@ export declare const registry: {
|
|
|
48
48
|
readonly CAPTCHA_REQUIRED: import("./define").DefinedError<import("./types").EmptyContext>;
|
|
49
49
|
readonly CAPTCHA_FAILED: import("./define").DefinedError<import("./types").EmptyContext>;
|
|
50
50
|
readonly FORBIDDEN: import("./define").DefinedError<import("./types").EmptyContext>;
|
|
51
|
+
readonly ACCESS_SUSPENDED: import("./define").DefinedError<{
|
|
52
|
+
reason?: string;
|
|
53
|
+
}>;
|
|
54
|
+
readonly SUSPENSION_FORBIDDEN: import("./define").DefinedError<{
|
|
55
|
+
database_id?: string;
|
|
56
|
+
}>;
|
|
57
|
+
readonly SUSPENSION_REASON_INVALID: import("./define").DefinedError<{
|
|
58
|
+
reason?: string;
|
|
59
|
+
}>;
|
|
51
60
|
readonly STEP_UP_REQUIRED: import("./define").DefinedError<import("./types").EmptyContext>;
|
|
52
61
|
readonly MFA_REQUIRED: import("./define").DefinedError<import("./types").EmptyContext>;
|
|
53
62
|
readonly INVALID_TOKEN: import("./define").DefinedError<import("./types").EmptyContext>;
|
package/esm/registry.js
CHANGED
|
@@ -247,6 +247,24 @@ export const registry = {
|
|
|
247
247
|
http: 403,
|
|
248
248
|
message: 'You do not have permission to do that.'
|
|
249
249
|
}),
|
|
250
|
+
ACCESS_SUSPENDED: defineError({
|
|
251
|
+
code: 'ACCESS_SUSPENDED',
|
|
252
|
+
class: 'public',
|
|
253
|
+
http: 403,
|
|
254
|
+
message: 'Access to this database is suspended.'
|
|
255
|
+
}),
|
|
256
|
+
SUSPENSION_FORBIDDEN: defineError({
|
|
257
|
+
code: 'SUSPENSION_FORBIDDEN',
|
|
258
|
+
class: 'public',
|
|
259
|
+
http: 403,
|
|
260
|
+
message: 'Only the platform may change database suspension.'
|
|
261
|
+
}),
|
|
262
|
+
SUSPENSION_REASON_INVALID: defineError({
|
|
263
|
+
code: 'SUSPENSION_REASON_INVALID',
|
|
264
|
+
class: 'public',
|
|
265
|
+
http: 400,
|
|
266
|
+
message: 'Suspension reason must be "billing" or "admin".'
|
|
267
|
+
}),
|
|
250
268
|
STEP_UP_REQUIRED: defineError({
|
|
251
269
|
code: 'STEP_UP_REQUIRED',
|
|
252
270
|
class: 'public',
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* GENERATED FILE — DO NOT EDIT BY HAND.
|
|
3
3
|
*
|
|
4
|
-
* Source of truth: the constructive-db error audit (
|
|
4
|
+
* Source of truth: the constructive-db error audit (784 distinct codes
|
|
5
5
|
* raised via EXCEPTION/THROW across deploy sources + generated output).
|
|
6
6
|
* Regenerate with `python3 scripts/generate-registry.py` (see README.md).
|
|
7
7
|
*
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
* codes carry their raw message (with %-args rendered as {{argN}}). Curated
|
|
10
10
|
* entries in `registry.ts` override anything here (typed context + refined copy).
|
|
11
11
|
*
|
|
12
|
-
* Counts:
|
|
12
|
+
* Counts: 784 total, 576 public, 208 internal.
|
|
13
13
|
*/
|
|
14
14
|
import { type DefinedError } from '../define';
|
|
15
15
|
import type { ErrorContext } from '../types';
|
|
@@ -24,4 +24,4 @@ export declare const generatedRegistry: Record<string, DefinedError<ErrorContext
|
|
|
24
24
|
/** Audit metadata for each generated code. */
|
|
25
25
|
export declare const GENERATED_CODE_META: Record<string, GeneratedCodeMeta>;
|
|
26
26
|
/** Total number of codes collected from constructive-db. */
|
|
27
|
-
export declare const GENERATED_CODE_COUNT =
|
|
27
|
+
export declare const GENERATED_CODE_COUNT = 784;
|
|
@@ -5,7 +5,7 @@ exports.GENERATED_CODE_COUNT = exports.GENERATED_CODE_META = exports.generatedRe
|
|
|
5
5
|
/**
|
|
6
6
|
* GENERATED FILE — DO NOT EDIT BY HAND.
|
|
7
7
|
*
|
|
8
|
-
* Source of truth: the constructive-db error audit (
|
|
8
|
+
* Source of truth: the constructive-db error audit (784 distinct codes
|
|
9
9
|
* raised via EXCEPTION/THROW across deploy sources + generated output).
|
|
10
10
|
* Regenerate with `python3 scripts/generate-registry.py` (see README.md).
|
|
11
11
|
*
|
|
@@ -13,7 +13,7 @@ exports.GENERATED_CODE_COUNT = exports.GENERATED_CODE_META = exports.generatedRe
|
|
|
13
13
|
* codes carry their raw message (with %-args rendered as {{argN}}). Curated
|
|
14
14
|
* entries in `registry.ts` override anything here (typed context + refined copy).
|
|
15
15
|
*
|
|
16
|
-
* Counts:
|
|
16
|
+
* Counts: 784 total, 576 public, 208 internal.
|
|
17
17
|
*/
|
|
18
18
|
const define_1 = require("../define");
|
|
19
19
|
/** Every constructive-db error code, keyed by code. */
|
|
@@ -137,6 +137,7 @@ exports.generatedRegistry = {
|
|
|
137
137
|
'CONTENT_PRESET_NOT_SAVED': (0, define_1.defineError)({ code: 'CONTENT_PRESET_NOT_SAVED', class: 'public', http: 400, message: 'Content preset not saved.' }),
|
|
138
138
|
'COPY_TEMPLATE_TO_BLUEPRINT': (0, define_1.defineError)({ code: 'COPY_TEMPLATE_TO_BLUEPRINT', class: 'internal', http: 500, message: 'Copy template to blueprint.' }),
|
|
139
139
|
'CREDENTIAL_NOT_EXCHANGEABLE': (0, define_1.defineError)({ code: 'CREDENTIAL_NOT_EXCHANGEABLE', class: 'public', http: 400, message: 'Credential not exchangeable.' }),
|
|
140
|
+
'CREDENTIAL_NOT_EXTENDABLE': (0, define_1.defineError)({ code: 'CREDENTIAL_NOT_EXTENDABLE', class: 'public', http: 400, message: 'Credential not extendable.' }),
|
|
140
141
|
'CREDIT_CODE_EXPIRED': (0, define_1.defineError)({ code: 'CREDIT_CODE_EXPIRED', class: 'internal', http: 500, message: 'Credit code expired.' }),
|
|
141
142
|
'CREDIT_CODE_MAX_REDEMPTIONS_REACHED': (0, define_1.defineError)({ code: 'CREDIT_CODE_MAX_REDEMPTIONS_REACHED', class: 'internal', http: 500, message: 'Credit code max redemptions reached.' }),
|
|
142
143
|
'CREDIT_CODE_NOT_FOUND': (0, define_1.defineError)({ code: 'CREDIT_CODE_NOT_FOUND', class: 'internal', http: 500, message: 'Credit code not found.' }),
|
|
@@ -537,6 +538,7 @@ exports.generatedRegistry = {
|
|
|
537
538
|
'MODULES_HASH_DUPLICATE_ENTRY': (0, define_1.defineError)({ code: 'MODULES_HASH_DUPLICATE_ENTRY', class: 'internal', http: 500, message: 'Modules hash duplicate entry.' }),
|
|
538
539
|
'MODULES_HASH_INVALID_ENTRY': (0, define_1.defineError)({ code: 'MODULES_HASH_INVALID_ENTRY', class: 'internal', http: 500, message: 'Modules hash invalid entry.' }),
|
|
539
540
|
'MODULES_HASH_INVALID_INPUT': (0, define_1.defineError)({ code: 'MODULES_HASH_INVALID_INPUT', class: 'internal', http: 500, message: 'Modules hash invalid input.' }),
|
|
541
|
+
'MODULE_ENTRY_MALFORMED': (0, define_1.defineError)({ code: 'MODULE_ENTRY_MALFORMED', class: 'internal', http: 500, message: 'Module entry malformed.' }),
|
|
540
542
|
'MODULE_SECURITY_POLICY_ENTRY_MISSING_TYPE': (0, define_1.defineError)({ code: 'MODULE_SECURITY_POLICY_ENTRY_MISSING_TYPE', class: 'public', http: 400, message: 'Module security policy entry missing type.' }),
|
|
541
543
|
'MODULE_TABLE_ALREADY_ATTRIBUTED': (0, define_1.defineError)({ code: 'MODULE_TABLE_ALREADY_ATTRIBUTED', class: 'internal', http: 500, message: 'Module table already attributed.' }),
|
|
542
544
|
'MONOTONIC_FIELD': (0, define_1.defineError)({ code: 'MONOTONIC_FIELD', class: 'internal', http: 500, message: 'Monotonic field.' }),
|
|
@@ -603,6 +605,7 @@ exports.generatedRegistry = {
|
|
|
603
605
|
'PROVISION_INDEX_COLUMNS_REQUIRED': (0, define_1.defineError)({ code: 'PROVISION_INDEX_COLUMNS_REQUIRED', class: 'internal', http: 500, message: 'Provision index columns required.' }),
|
|
604
606
|
'PROVISION_INDEX_FIELD_NOT_FOUND': (0, define_1.defineError)({ code: 'PROVISION_INDEX_FIELD_NOT_FOUND', class: 'internal', http: 500, message: 'Provision index field not found.' }),
|
|
605
607
|
'PROVISION_INVALID_DATABASE_ID': (0, define_1.defineError)({ code: 'PROVISION_INVALID_DATABASE_ID', class: 'internal', http: 500, message: 'Provision invalid database id.' }),
|
|
608
|
+
'PROVISION_PRIVATE_API_NAME_FORBIDDEN': (0, define_1.defineError)({ code: 'PROVISION_PRIVATE_API_NAME_FORBIDDEN', class: 'public', http: 403, message: 'Provision private api name forbidden.' }),
|
|
606
609
|
'PROVISION_RELATION': (0, define_1.defineError)({ code: 'PROVISION_RELATION', class: 'internal', http: 500, message: 'Provision relation.' }),
|
|
607
610
|
'PROVISION_TABLE': (0, define_1.defineError)({ code: 'PROVISION_TABLE', class: 'internal', http: 500, message: 'Provision table.' }),
|
|
608
611
|
'PROVISION_UNIQUE_CONSTRAINT': (0, define_1.defineError)({ code: 'PROVISION_UNIQUE_CONSTRAINT', class: 'internal', http: 500, message: 'Provision unique constraint.' }),
|
|
@@ -748,6 +751,8 @@ exports.generatedRegistry = {
|
|
|
748
751
|
'SUBDOMAIN_LABEL_EXHAUSTED': (0, define_1.defineError)({ code: 'SUBDOMAIN_LABEL_EXHAUSTED', class: 'public', http: 400, message: 'Subdomain label exhausted.' }),
|
|
749
752
|
'SUBDOMAIN_LABEL_INVALID': (0, define_1.defineError)({ code: 'SUBDOMAIN_LABEL_INVALID', class: 'public', http: 400, message: 'Subdomain label invalid.' }),
|
|
750
753
|
'SUPER_CONSTRUCTIVE_REQUIRED': (0, define_1.defineError)({ code: 'SUPER_CONSTRUCTIVE_REQUIRED', class: 'public', http: 400, message: 'Super constructive required.' }),
|
|
754
|
+
'SUSPENSION_FORBIDDEN': (0, define_1.defineError)({ code: 'SUSPENSION_FORBIDDEN', class: 'public', http: 403, message: 'Suspension forbidden.' }),
|
|
755
|
+
'SUSPENSION_REASON_INVALID': (0, define_1.defineError)({ code: 'SUSPENSION_REASON_INVALID', class: 'public', http: 400, message: 'Suspension reason invalid.' }),
|
|
751
756
|
'TABLE_MODULE': (0, define_1.defineError)({ code: 'TABLE_MODULE', class: 'internal', http: 500, message: 'Table module.' }),
|
|
752
757
|
'TABLE_MODULE_TABLE_NOT_FOUND': (0, define_1.defineError)({ code: 'TABLE_MODULE_TABLE_NOT_FOUND', class: 'internal', http: 500, message: 'Table module table not found.' }),
|
|
753
758
|
'TARGET_EMAILS_NOT_FOUND': (0, define_1.defineError)({ code: 'TARGET_EMAILS_NOT_FOUND', class: 'internal', http: 500, message: 'Target emails not found.' }),
|
|
@@ -770,6 +775,7 @@ exports.generatedRegistry = {
|
|
|
770
775
|
'TRIGGER_NOT_TRANSPILABLE': (0, define_1.defineError)({ code: 'TRIGGER_NOT_TRANSPILABLE', class: 'public', http: 400, message: 'Trigger not transpilable.' }),
|
|
771
776
|
'TRIGGER_WHEN_AST_INVALID': (0, define_1.defineError)({ code: 'TRIGGER_WHEN_AST_INVALID', class: 'public', http: 400, message: 'Trigger when ast invalid.' }),
|
|
772
777
|
'TRIGGER_WHEN_AST_ROW_UNAVAILABLE': (0, define_1.defineError)({ code: 'TRIGGER_WHEN_AST_ROW_UNAVAILABLE', class: 'public', http: 400, message: 'Trigger when ast row unavailable.' }),
|
|
778
|
+
'TRUST_LADDER_OPTION_INVALID': (0, define_1.defineError)({ code: 'TRUST_LADDER_OPTION_INVALID', class: 'internal', http: 500, message: 'Trust ladder option invalid.' }),
|
|
773
779
|
'UNAUTHENTICATED': (0, define_1.defineError)({ code: 'UNAUTHENTICATED', class: 'public', http: 401, message: 'Unauthenticated.' }),
|
|
774
780
|
'UNKNOWN_POLICY_TYPE': (0, define_1.defineError)({ code: 'UNKNOWN_POLICY_TYPE', class: 'public', http: 400, message: 'Unknown policy type.' }),
|
|
775
781
|
'UNKNOWN_VIEW_TYPE': (0, define_1.defineError)({ code: 'UNKNOWN_VIEW_TYPE', class: 'public', http: 400, message: 'Unknown view type.', positional: ['arg0'] }),
|
|
@@ -918,6 +924,7 @@ exports.GENERATED_CODE_META = {
|
|
|
918
924
|
'CONTENT_PRESET_NOT_SAVED': { class: 'public', dynamic: false, generatedOnly: false },
|
|
919
925
|
'COPY_TEMPLATE_TO_BLUEPRINT': { class: 'internal', dynamic: false, generatedOnly: false },
|
|
920
926
|
'CREDENTIAL_NOT_EXCHANGEABLE': { class: 'public', dynamic: false, generatedOnly: true },
|
|
927
|
+
'CREDENTIAL_NOT_EXTENDABLE': { class: 'public', dynamic: false, generatedOnly: false },
|
|
921
928
|
'CREDIT_CODE_EXPIRED': { class: 'internal', dynamic: false, generatedOnly: false },
|
|
922
929
|
'CREDIT_CODE_MAX_REDEMPTIONS_REACHED': { class: 'internal', dynamic: false, generatedOnly: false },
|
|
923
930
|
'CREDIT_CODE_NOT_FOUND': { class: 'internal', dynamic: false, generatedOnly: false },
|
|
@@ -1318,6 +1325,7 @@ exports.GENERATED_CODE_META = {
|
|
|
1318
1325
|
'MODULES_HASH_DUPLICATE_ENTRY': { class: 'internal', dynamic: false, generatedOnly: false },
|
|
1319
1326
|
'MODULES_HASH_INVALID_ENTRY': { class: 'internal', dynamic: false, generatedOnly: false },
|
|
1320
1327
|
'MODULES_HASH_INVALID_INPUT': { class: 'internal', dynamic: false, generatedOnly: false },
|
|
1328
|
+
'MODULE_ENTRY_MALFORMED': { class: 'internal', dynamic: false, generatedOnly: false },
|
|
1321
1329
|
'MODULE_SECURITY_POLICY_ENTRY_MISSING_TYPE': { class: 'public', dynamic: false, generatedOnly: false },
|
|
1322
1330
|
'MODULE_TABLE_ALREADY_ATTRIBUTED': { class: 'internal', dynamic: false, generatedOnly: false },
|
|
1323
1331
|
'MONOTONIC_FIELD': { class: 'internal', dynamic: false, generatedOnly: true },
|
|
@@ -1384,6 +1392,7 @@ exports.GENERATED_CODE_META = {
|
|
|
1384
1392
|
'PROVISION_INDEX_COLUMNS_REQUIRED': { class: 'internal', dynamic: false, generatedOnly: false },
|
|
1385
1393
|
'PROVISION_INDEX_FIELD_NOT_FOUND': { class: 'internal', dynamic: false, generatedOnly: false },
|
|
1386
1394
|
'PROVISION_INVALID_DATABASE_ID': { class: 'internal', dynamic: false, generatedOnly: false },
|
|
1395
|
+
'PROVISION_PRIVATE_API_NAME_FORBIDDEN': { class: 'public', dynamic: false, generatedOnly: false },
|
|
1387
1396
|
'PROVISION_RELATION': { class: 'internal', dynamic: false, generatedOnly: false },
|
|
1388
1397
|
'PROVISION_TABLE': { class: 'internal', dynamic: false, generatedOnly: false },
|
|
1389
1398
|
'PROVISION_UNIQUE_CONSTRAINT': { class: 'internal', dynamic: false, generatedOnly: false },
|
|
@@ -1529,6 +1538,8 @@ exports.GENERATED_CODE_META = {
|
|
|
1529
1538
|
'SUBDOMAIN_LABEL_EXHAUSTED': { class: 'public', dynamic: false, generatedOnly: false },
|
|
1530
1539
|
'SUBDOMAIN_LABEL_INVALID': { class: 'public', dynamic: false, generatedOnly: false },
|
|
1531
1540
|
'SUPER_CONSTRUCTIVE_REQUIRED': { class: 'public', dynamic: false, generatedOnly: false },
|
|
1541
|
+
'SUSPENSION_FORBIDDEN': { class: 'public', dynamic: false, generatedOnly: false },
|
|
1542
|
+
'SUSPENSION_REASON_INVALID': { class: 'public', dynamic: false, generatedOnly: false },
|
|
1532
1543
|
'TABLE_MODULE': { class: 'internal', dynamic: false, generatedOnly: false },
|
|
1533
1544
|
'TABLE_MODULE_TABLE_NOT_FOUND': { class: 'internal', dynamic: false, generatedOnly: false },
|
|
1534
1545
|
'TARGET_EMAILS_NOT_FOUND': { class: 'internal', dynamic: false, generatedOnly: false },
|
|
@@ -1551,6 +1562,7 @@ exports.GENERATED_CODE_META = {
|
|
|
1551
1562
|
'TRIGGER_NOT_TRANSPILABLE': { class: 'public', dynamic: false, generatedOnly: false },
|
|
1552
1563
|
'TRIGGER_WHEN_AST_INVALID': { class: 'public', dynamic: false, generatedOnly: false },
|
|
1553
1564
|
'TRIGGER_WHEN_AST_ROW_UNAVAILABLE': { class: 'public', dynamic: false, generatedOnly: false },
|
|
1565
|
+
'TRUST_LADDER_OPTION_INVALID': { class: 'internal', dynamic: false, generatedOnly: false },
|
|
1554
1566
|
'UNAUTHENTICATED': { class: 'public', dynamic: false, generatedOnly: false },
|
|
1555
1567
|
'UNKNOWN_POLICY_TYPE': { class: 'public', dynamic: false, generatedOnly: false },
|
|
1556
1568
|
'UNKNOWN_VIEW_TYPE': { class: 'public', dynamic: true, generatedOnly: false },
|
|
@@ -1579,4 +1591,4 @@ exports.GENERATED_CODE_META = {
|
|
|
1579
1591
|
'WITH_CHECK_NOT_ALLOWED': { class: 'public', dynamic: false, generatedOnly: false },
|
|
1580
1592
|
};
|
|
1581
1593
|
/** Total number of codes collected from constructive-db. */
|
|
1582
|
-
exports.GENERATED_CODE_COUNT =
|
|
1594
|
+
exports.GENERATED_CODE_COUNT = 784;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@constructive-io/errors",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.14.0",
|
|
4
4
|
"author": "Constructive <developers@constructive.io>",
|
|
5
5
|
"description": "Canonical Constructive error system: registry, codes, i18n messages, and cross-source (PostgreSQL/GraphQL/client) parsing. Zero runtime dependencies.",
|
|
6
6
|
"main": "index.js",
|
|
@@ -41,5 +41,5 @@
|
|
|
41
41
|
"makage": "^0.8.0",
|
|
42
42
|
"ts-node": "^10.9.2"
|
|
43
43
|
},
|
|
44
|
-
"gitHead": "
|
|
44
|
+
"gitHead": "27be33dc1ba8351e2a2c2bbb99b9c0798c0813b9"
|
|
45
45
|
}
|
package/registry.d.ts
CHANGED
|
@@ -48,6 +48,15 @@ export declare const registry: {
|
|
|
48
48
|
readonly CAPTCHA_REQUIRED: import("./define").DefinedError<import("./types").EmptyContext>;
|
|
49
49
|
readonly CAPTCHA_FAILED: import("./define").DefinedError<import("./types").EmptyContext>;
|
|
50
50
|
readonly FORBIDDEN: import("./define").DefinedError<import("./types").EmptyContext>;
|
|
51
|
+
readonly ACCESS_SUSPENDED: import("./define").DefinedError<{
|
|
52
|
+
reason?: string;
|
|
53
|
+
}>;
|
|
54
|
+
readonly SUSPENSION_FORBIDDEN: import("./define").DefinedError<{
|
|
55
|
+
database_id?: string;
|
|
56
|
+
}>;
|
|
57
|
+
readonly SUSPENSION_REASON_INVALID: import("./define").DefinedError<{
|
|
58
|
+
reason?: string;
|
|
59
|
+
}>;
|
|
51
60
|
readonly STEP_UP_REQUIRED: import("./define").DefinedError<import("./types").EmptyContext>;
|
|
52
61
|
readonly MFA_REQUIRED: import("./define").DefinedError<import("./types").EmptyContext>;
|
|
53
62
|
readonly INVALID_TOKEN: import("./define").DefinedError<import("./types").EmptyContext>;
|
package/registry.js
CHANGED
|
@@ -253,6 +253,24 @@ exports.registry = {
|
|
|
253
253
|
http: 403,
|
|
254
254
|
message: 'You do not have permission to do that.'
|
|
255
255
|
}),
|
|
256
|
+
ACCESS_SUSPENDED: (0, define_1.defineError)({
|
|
257
|
+
code: 'ACCESS_SUSPENDED',
|
|
258
|
+
class: 'public',
|
|
259
|
+
http: 403,
|
|
260
|
+
message: 'Access to this database is suspended.'
|
|
261
|
+
}),
|
|
262
|
+
SUSPENSION_FORBIDDEN: (0, define_1.defineError)({
|
|
263
|
+
code: 'SUSPENSION_FORBIDDEN',
|
|
264
|
+
class: 'public',
|
|
265
|
+
http: 403,
|
|
266
|
+
message: 'Only the platform may change database suspension.'
|
|
267
|
+
}),
|
|
268
|
+
SUSPENSION_REASON_INVALID: (0, define_1.defineError)({
|
|
269
|
+
code: 'SUSPENSION_REASON_INVALID',
|
|
270
|
+
class: 'public',
|
|
271
|
+
http: 400,
|
|
272
|
+
message: 'Suspension reason must be "billing" or "admin".'
|
|
273
|
+
}),
|
|
256
274
|
STEP_UP_REQUIRED: (0, define_1.defineError)({
|
|
257
275
|
code: 'STEP_UP_REQUIRED',
|
|
258
276
|
class: 'public',
|