@constructive-io/errors 0.11.1 → 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 +17 -0
- package/esm/registry.js +40 -0
- package/package.json +3 -3
- package/registry.d.ts +17 -0
- package/registry.js +40 -0
package/esm/registry.d.ts
CHANGED
|
@@ -56,6 +56,23 @@ export declare const registry: {
|
|
|
56
56
|
limit?: number;
|
|
57
57
|
}>;
|
|
58
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>;
|
|
59
76
|
readonly NETWORK_ERROR: import("./define").DefinedError<import("./types").EmptyContext>;
|
|
60
77
|
readonly TIMEOUT_ERROR: import("./define").DefinedError<import("./types").EmptyContext>;
|
|
61
78
|
readonly BAD_USER_INPUT: import("./define").DefinedError<import("./types").EmptyContext>;
|
package/esm/registry.js
CHANGED
|
@@ -282,6 +282,46 @@ export const registry = {
|
|
|
282
282
|
message: 'Too many requests. Please slow down and try again shortly.'
|
|
283
283
|
}),
|
|
284
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
|
+
// ===========================================================================
|
|
285
325
|
// Client / transport (public) — synthesized client-side by the GraphQL client
|
|
286
326
|
// for network, timeout, and HTTP-level failures (no DB/server origin).
|
|
287
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
|
@@ -56,6 +56,23 @@ export declare const registry: {
|
|
|
56
56
|
limit?: number;
|
|
57
57
|
}>;
|
|
58
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>;
|
|
59
76
|
readonly NETWORK_ERROR: import("./define").DefinedError<import("./types").EmptyContext>;
|
|
60
77
|
readonly TIMEOUT_ERROR: import("./define").DefinedError<import("./types").EmptyContext>;
|
|
61
78
|
readonly BAD_USER_INPUT: import("./define").DefinedError<import("./types").EmptyContext>;
|
package/registry.js
CHANGED
|
@@ -288,6 +288,46 @@ exports.registry = {
|
|
|
288
288
|
message: 'Too many requests. Please slow down and try again shortly.'
|
|
289
289
|
}),
|
|
290
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
|
+
// ===========================================================================
|
|
291
331
|
// Client / transport (public) — synthesized client-side by the GraphQL client
|
|
292
332
|
// for network, timeout, and HTTP-level failures (no DB/server origin).
|
|
293
333
|
// ===========================================================================
|