@constructive-io/errors 0.12.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 +505 -29
- 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 +505 -29
- package/package.json +2 -2
- package/registry.d.ts +9 -0
- package/registry.js +18 -0
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;
|