@constructive-io/errors 0.11.0 → 0.11.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.
- package/esm/registry.d.ts +18 -0
- package/esm/registry.js +46 -0
- package/package.json +3 -3
- package/registry.d.ts +18 -0
- package/registry.js +46 -0
package/esm/registry.d.ts
CHANGED
|
@@ -10,6 +10,7 @@ export { type DefinedError, defineError } from './define';
|
|
|
10
10
|
* code is present via generation; these just refine a subset.
|
|
11
11
|
*/
|
|
12
12
|
export declare const registry: {
|
|
13
|
+
readonly STORAGE_BUCKET_NOT_RECONCILED: import("./define").DefinedError<import("./types").EmptyContext>;
|
|
13
14
|
readonly ACCOUNT_EXISTS: import("./define").DefinedError<import("./types").EmptyContext>;
|
|
14
15
|
readonly ACCOUNT_NOT_FOUND: import("./define").DefinedError<import("./types").EmptyContext>;
|
|
15
16
|
readonly NO_ACCOUNT_EXISTS: import("./define").DefinedError<{
|
|
@@ -55,6 +56,23 @@ export declare const registry: {
|
|
|
55
56
|
limit?: number;
|
|
56
57
|
}>;
|
|
57
58
|
readonly RATE_LIMITED: import("./define").DefinedError<import("./types").EmptyContext>;
|
|
59
|
+
readonly QUERY_TOO_DEEP: import("./define").DefinedError<{
|
|
60
|
+
depth?: number;
|
|
61
|
+
limit?: number;
|
|
62
|
+
}>;
|
|
63
|
+
readonly QUERY_TOO_COSTLY: import("./define").DefinedError<{
|
|
64
|
+
cost?: number;
|
|
65
|
+
limit?: number;
|
|
66
|
+
}>;
|
|
67
|
+
readonly PAGE_SIZE_TOO_LARGE: import("./define").DefinedError<{
|
|
68
|
+
requested?: number;
|
|
69
|
+
limit?: number;
|
|
70
|
+
}>;
|
|
71
|
+
readonly REQUEST_TOO_LARGE: import("./define").DefinedError<{
|
|
72
|
+
bytes?: number;
|
|
73
|
+
limit?: number;
|
|
74
|
+
}>;
|
|
75
|
+
readonly INTROSPECTION_DISABLED: import("./define").DefinedError<import("./types").EmptyContext>;
|
|
58
76
|
readonly NETWORK_ERROR: import("./define").DefinedError<import("./types").EmptyContext>;
|
|
59
77
|
readonly TIMEOUT_ERROR: import("./define").DefinedError<import("./types").EmptyContext>;
|
|
60
78
|
readonly BAD_USER_INPUT: import("./define").DefinedError<import("./types").EmptyContext>;
|
package/esm/registry.js
CHANGED
|
@@ -11,6 +11,12 @@ export { defineError } from './define';
|
|
|
11
11
|
* code is present via generation; these just refine a subset.
|
|
12
12
|
*/
|
|
13
13
|
export const registry = {
|
|
14
|
+
STORAGE_BUCKET_NOT_RECONCILED: defineError({
|
|
15
|
+
code: 'STORAGE_BUCKET_NOT_RECONCILED',
|
|
16
|
+
class: 'public',
|
|
17
|
+
http: 409,
|
|
18
|
+
message: 'The storage bucket has not yet been reconciled.'
|
|
19
|
+
}),
|
|
14
20
|
// ===========================================================================
|
|
15
21
|
// Auth / account (public) — copy sourced from dashboard auth-errors.ts
|
|
16
22
|
// ===========================================================================
|
|
@@ -276,6 +282,46 @@ export const registry = {
|
|
|
276
282
|
message: 'Too many requests. Please slow down and try again shortly.'
|
|
277
283
|
}),
|
|
278
284
|
// ===========================================================================
|
|
285
|
+
// Request protection (public, dynamic) — raised by the GraphQL runtime when a
|
|
286
|
+
// request exceeds the bounds resolved from database_settings/api_settings.
|
|
287
|
+
// Each carries the limit that was in force so a client can adapt rather than
|
|
288
|
+
// guess.
|
|
289
|
+
// ===========================================================================
|
|
290
|
+
QUERY_TOO_DEEP: defineError({
|
|
291
|
+
code: 'QUERY_TOO_DEEP',
|
|
292
|
+
class: 'public',
|
|
293
|
+
http: 400,
|
|
294
|
+
message: 'The query is nested too deeply. Please request fewer nested levels.',
|
|
295
|
+
positional: ['depth', 'limit']
|
|
296
|
+
}),
|
|
297
|
+
QUERY_TOO_COSTLY: defineError({
|
|
298
|
+
code: 'QUERY_TOO_COSTLY',
|
|
299
|
+
class: 'public',
|
|
300
|
+
http: 400,
|
|
301
|
+
message: 'The query is too expensive. Please request fewer records or fewer nested lists.',
|
|
302
|
+
positional: ['cost', 'limit']
|
|
303
|
+
}),
|
|
304
|
+
PAGE_SIZE_TOO_LARGE: defineError({
|
|
305
|
+
code: 'PAGE_SIZE_TOO_LARGE',
|
|
306
|
+
class: 'public',
|
|
307
|
+
http: 400,
|
|
308
|
+
message: 'The requested page size is too large. Please request fewer records per page.',
|
|
309
|
+
positional: ['requested', 'limit']
|
|
310
|
+
}),
|
|
311
|
+
REQUEST_TOO_LARGE: defineError({
|
|
312
|
+
code: 'REQUEST_TOO_LARGE',
|
|
313
|
+
class: 'public',
|
|
314
|
+
http: 413,
|
|
315
|
+
message: 'The request body is too large.',
|
|
316
|
+
positional: ['bytes', 'limit']
|
|
317
|
+
}),
|
|
318
|
+
INTROSPECTION_DISABLED: defineError({
|
|
319
|
+
code: 'INTROSPECTION_DISABLED',
|
|
320
|
+
class: 'public',
|
|
321
|
+
http: 403,
|
|
322
|
+
message: 'Schema introspection is disabled for this API.'
|
|
323
|
+
}),
|
|
324
|
+
// ===========================================================================
|
|
279
325
|
// Client / transport (public) — synthesized client-side by the GraphQL client
|
|
280
326
|
// for network, timeout, and HTTP-level failures (no DB/server origin).
|
|
281
327
|
// ===========================================================================
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@constructive-io/errors",
|
|
3
|
-
"version": "0.11.
|
|
3
|
+
"version": "0.11.2",
|
|
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",
|
|
@@ -38,8 +38,8 @@
|
|
|
38
38
|
],
|
|
39
39
|
"devDependencies": {
|
|
40
40
|
"@types/node": "^22.19.11",
|
|
41
|
-
"makage": "^0.
|
|
41
|
+
"makage": "^0.8.0",
|
|
42
42
|
"ts-node": "^10.9.2"
|
|
43
43
|
},
|
|
44
|
-
"gitHead": "
|
|
44
|
+
"gitHead": "5e0bfead2856d1a062b495d343a43e543343f9b8"
|
|
45
45
|
}
|
package/registry.d.ts
CHANGED
|
@@ -10,6 +10,7 @@ export { type DefinedError, defineError } from './define';
|
|
|
10
10
|
* code is present via generation; these just refine a subset.
|
|
11
11
|
*/
|
|
12
12
|
export declare const registry: {
|
|
13
|
+
readonly STORAGE_BUCKET_NOT_RECONCILED: import("./define").DefinedError<import("./types").EmptyContext>;
|
|
13
14
|
readonly ACCOUNT_EXISTS: import("./define").DefinedError<import("./types").EmptyContext>;
|
|
14
15
|
readonly ACCOUNT_NOT_FOUND: import("./define").DefinedError<import("./types").EmptyContext>;
|
|
15
16
|
readonly NO_ACCOUNT_EXISTS: import("./define").DefinedError<{
|
|
@@ -55,6 +56,23 @@ export declare const registry: {
|
|
|
55
56
|
limit?: number;
|
|
56
57
|
}>;
|
|
57
58
|
readonly RATE_LIMITED: import("./define").DefinedError<import("./types").EmptyContext>;
|
|
59
|
+
readonly QUERY_TOO_DEEP: import("./define").DefinedError<{
|
|
60
|
+
depth?: number;
|
|
61
|
+
limit?: number;
|
|
62
|
+
}>;
|
|
63
|
+
readonly QUERY_TOO_COSTLY: import("./define").DefinedError<{
|
|
64
|
+
cost?: number;
|
|
65
|
+
limit?: number;
|
|
66
|
+
}>;
|
|
67
|
+
readonly PAGE_SIZE_TOO_LARGE: import("./define").DefinedError<{
|
|
68
|
+
requested?: number;
|
|
69
|
+
limit?: number;
|
|
70
|
+
}>;
|
|
71
|
+
readonly REQUEST_TOO_LARGE: import("./define").DefinedError<{
|
|
72
|
+
bytes?: number;
|
|
73
|
+
limit?: number;
|
|
74
|
+
}>;
|
|
75
|
+
readonly INTROSPECTION_DISABLED: import("./define").DefinedError<import("./types").EmptyContext>;
|
|
58
76
|
readonly NETWORK_ERROR: import("./define").DefinedError<import("./types").EmptyContext>;
|
|
59
77
|
readonly TIMEOUT_ERROR: import("./define").DefinedError<import("./types").EmptyContext>;
|
|
60
78
|
readonly BAD_USER_INPUT: import("./define").DefinedError<import("./types").EmptyContext>;
|
package/registry.js
CHANGED
|
@@ -17,6 +17,12 @@ Object.defineProperty(exports, "defineError", { enumerable: true, get: function
|
|
|
17
17
|
* code is present via generation; these just refine a subset.
|
|
18
18
|
*/
|
|
19
19
|
exports.registry = {
|
|
20
|
+
STORAGE_BUCKET_NOT_RECONCILED: (0, define_1.defineError)({
|
|
21
|
+
code: 'STORAGE_BUCKET_NOT_RECONCILED',
|
|
22
|
+
class: 'public',
|
|
23
|
+
http: 409,
|
|
24
|
+
message: 'The storage bucket has not yet been reconciled.'
|
|
25
|
+
}),
|
|
20
26
|
// ===========================================================================
|
|
21
27
|
// Auth / account (public) — copy sourced from dashboard auth-errors.ts
|
|
22
28
|
// ===========================================================================
|
|
@@ -282,6 +288,46 @@ exports.registry = {
|
|
|
282
288
|
message: 'Too many requests. Please slow down and try again shortly.'
|
|
283
289
|
}),
|
|
284
290
|
// ===========================================================================
|
|
291
|
+
// Request protection (public, dynamic) — raised by the GraphQL runtime when a
|
|
292
|
+
// request exceeds the bounds resolved from database_settings/api_settings.
|
|
293
|
+
// Each carries the limit that was in force so a client can adapt rather than
|
|
294
|
+
// guess.
|
|
295
|
+
// ===========================================================================
|
|
296
|
+
QUERY_TOO_DEEP: (0, define_1.defineError)({
|
|
297
|
+
code: 'QUERY_TOO_DEEP',
|
|
298
|
+
class: 'public',
|
|
299
|
+
http: 400,
|
|
300
|
+
message: 'The query is nested too deeply. Please request fewer nested levels.',
|
|
301
|
+
positional: ['depth', 'limit']
|
|
302
|
+
}),
|
|
303
|
+
QUERY_TOO_COSTLY: (0, define_1.defineError)({
|
|
304
|
+
code: 'QUERY_TOO_COSTLY',
|
|
305
|
+
class: 'public',
|
|
306
|
+
http: 400,
|
|
307
|
+
message: 'The query is too expensive. Please request fewer records or fewer nested lists.',
|
|
308
|
+
positional: ['cost', 'limit']
|
|
309
|
+
}),
|
|
310
|
+
PAGE_SIZE_TOO_LARGE: (0, define_1.defineError)({
|
|
311
|
+
code: 'PAGE_SIZE_TOO_LARGE',
|
|
312
|
+
class: 'public',
|
|
313
|
+
http: 400,
|
|
314
|
+
message: 'The requested page size is too large. Please request fewer records per page.',
|
|
315
|
+
positional: ['requested', 'limit']
|
|
316
|
+
}),
|
|
317
|
+
REQUEST_TOO_LARGE: (0, define_1.defineError)({
|
|
318
|
+
code: 'REQUEST_TOO_LARGE',
|
|
319
|
+
class: 'public',
|
|
320
|
+
http: 413,
|
|
321
|
+
message: 'The request body is too large.',
|
|
322
|
+
positional: ['bytes', 'limit']
|
|
323
|
+
}),
|
|
324
|
+
INTROSPECTION_DISABLED: (0, define_1.defineError)({
|
|
325
|
+
code: 'INTROSPECTION_DISABLED',
|
|
326
|
+
class: 'public',
|
|
327
|
+
http: 403,
|
|
328
|
+
message: 'Schema introspection is disabled for this API.'
|
|
329
|
+
}),
|
|
330
|
+
// ===========================================================================
|
|
285
331
|
// Client / transport (public) — synthesized client-side by the GraphQL client
|
|
286
332
|
// for network, timeout, and HTTP-level failures (no DB/server origin).
|
|
287
333
|
// ===========================================================================
|