ts-procedures 9.2.0 → 10.0.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/CHANGELOG.md +25 -0
- package/build/codegen/bin/cli.js +1 -1
- package/build/codegen/bin/cli.js.map +1 -1
- package/build/codegen/emit/api-route.js +1 -1
- package/build/codegen/emit/api-route.js.map +1 -1
- package/build/codegen/emit/scope-file.js +1 -1
- package/build/codegen/emit/scope-file.js.map +1 -1
- package/build/codegen/emit-errors.integration.test.js +2 -2
- package/build/codegen/emit-errors.integration.test.js.map +1 -1
- package/build/codegen/resolve-envelope.js +1 -1
- package/build/codegen/resolve-envelope.js.map +1 -1
- package/build/codegen/test-helpers/run-tsc.js +1 -1
- package/build/codegen/test-helpers/run-tsc.js.map +1 -1
- package/package.json +8 -8
- package/src/codegen/bin/cli.ts +1 -1
- package/src/codegen/emit/api-route.ts +1 -1
- package/src/codegen/emit/scope-file.ts +2 -1
- package/src/codegen/emit-errors.integration.test.ts +2 -2
- package/src/codegen/resolve-envelope.ts +1 -1
- package/src/codegen/test-helpers/run-tsc.ts +1 -0
- package/build/errors.d.ts +0 -33
- package/build/errors.js +0 -91
- package/build/errors.js.map +0 -1
- package/build/errors.test.d.ts +0 -1
- package/build/errors.test.js +0 -122
- package/build/errors.test.js.map +0 -1
- package/build/implementations/http/doc-registry.d.ts +0 -28
- package/build/implementations/http/doc-registry.js +0 -96
- package/build/implementations/http/doc-registry.js.map +0 -1
- package/build/implementations/http/doc-registry.test.d.ts +0 -1
- package/build/implementations/http/doc-registry.test.js +0 -516
- package/build/implementations/http/doc-registry.test.js.map +0 -1
- package/build/implementations/http/error-taxonomy.d.ts +0 -249
- package/build/implementations/http/error-taxonomy.js +0 -252
- package/build/implementations/http/error-taxonomy.js.map +0 -1
- package/build/implementations/http/error-taxonomy.test.d.ts +0 -1
- package/build/implementations/http/error-taxonomy.test.js +0 -399
- package/build/implementations/http/error-taxonomy.test.js.map +0 -1
- package/build/implementations/http/express-rpc/error-taxonomy.test.d.ts +0 -1
- package/build/implementations/http/express-rpc/error-taxonomy.test.js +0 -83
- package/build/implementations/http/express-rpc/error-taxonomy.test.js.map +0 -1
- package/build/implementations/http/express-rpc/index.d.ts +0 -125
- package/build/implementations/http/express-rpc/index.js +0 -216
- package/build/implementations/http/express-rpc/index.js.map +0 -1
- package/build/implementations/http/express-rpc/index.test.d.ts +0 -1
- package/build/implementations/http/express-rpc/index.test.js +0 -684
- package/build/implementations/http/express-rpc/index.test.js.map +0 -1
- package/build/implementations/http/express-rpc/types.d.ts +0 -11
- package/build/implementations/http/express-rpc/types.js +0 -2
- package/build/implementations/http/express-rpc/types.js.map +0 -1
- package/build/implementations/http/hono-api/error-taxonomy.test.d.ts +0 -1
- package/build/implementations/http/hono-api/error-taxonomy.test.js +0 -137
- package/build/implementations/http/hono-api/error-taxonomy.test.js.map +0 -1
- package/build/implementations/http/hono-api/index.d.ts +0 -151
- package/build/implementations/http/hono-api/index.js +0 -344
- package/build/implementations/http/hono-api/index.js.map +0 -1
- package/build/implementations/http/hono-api/index.test.d.ts +0 -1
- package/build/implementations/http/hono-api/index.test.js +0 -992
- package/build/implementations/http/hono-api/index.test.js.map +0 -1
- package/build/implementations/http/hono-api/types.d.ts +0 -13
- package/build/implementations/http/hono-api/types.js +0 -2
- package/build/implementations/http/hono-api/types.js.map +0 -1
- package/build/implementations/http/hono-rpc/error-taxonomy.test.d.ts +0 -1
- package/build/implementations/http/hono-rpc/error-taxonomy.test.js +0 -64
- package/build/implementations/http/hono-rpc/error-taxonomy.test.js.map +0 -1
- package/build/implementations/http/hono-rpc/index.d.ts +0 -130
- package/build/implementations/http/hono-rpc/index.js +0 -209
- package/build/implementations/http/hono-rpc/index.js.map +0 -1
- package/build/implementations/http/hono-rpc/index.test.d.ts +0 -1
- package/build/implementations/http/hono-rpc/index.test.js +0 -828
- package/build/implementations/http/hono-rpc/index.test.js.map +0 -1
- package/build/implementations/http/hono-rpc/types.d.ts +0 -11
- package/build/implementations/http/hono-rpc/types.js +0 -2
- package/build/implementations/http/hono-rpc/types.js.map +0 -1
- package/build/implementations/http/hono-stream/error-taxonomy.test.d.ts +0 -1
- package/build/implementations/http/hono-stream/error-taxonomy.test.js +0 -159
- package/build/implementations/http/hono-stream/error-taxonomy.test.js.map +0 -1
- package/build/implementations/http/hono-stream/index.d.ts +0 -171
- package/build/implementations/http/hono-stream/index.js +0 -415
- package/build/implementations/http/hono-stream/index.js.map +0 -1
- package/build/implementations/http/hono-stream/index.test.d.ts +0 -1
- package/build/implementations/http/hono-stream/index.test.js +0 -1383
- package/build/implementations/http/hono-stream/index.test.js.map +0 -1
- package/build/implementations/http/hono-stream/types.d.ts +0 -15
- package/build/implementations/http/hono-stream/types.js +0 -2
- package/build/implementations/http/hono-stream/types.js.map +0 -1
- package/build/implementations/http/on-request-error.test.d.ts +0 -1
- package/build/implementations/http/on-request-error.test.js +0 -173
- package/build/implementations/http/on-request-error.test.js.map +0 -1
- package/build/implementations/http/route-errors.test.d.ts +0 -1
- package/build/implementations/http/route-errors.test.js +0 -139
- package/build/implementations/http/route-errors.test.js.map +0 -1
- package/build/implementations/types.d.ts +0 -192
- package/build/implementations/types.js +0 -2
- package/build/implementations/types.js.map +0 -1
- package/build/index.d.ts +0 -165
- package/build/index.js +0 -258
- package/build/index.js.map +0 -1
- package/build/index.test.d.ts +0 -1
- package/build/index.test.js +0 -920
- package/build/index.test.js.map +0 -1
- package/build/schema/extract-json-schema.d.ts +0 -2
- package/build/schema/extract-json-schema.js +0 -12
- package/build/schema/extract-json-schema.js.map +0 -1
- package/build/schema/extract-json-schema.test.d.ts +0 -1
- package/build/schema/extract-json-schema.test.js +0 -23
- package/build/schema/extract-json-schema.test.js.map +0 -1
- package/build/schema/parser.d.ts +0 -28
- package/build/schema/parser.js +0 -170
- package/build/schema/parser.js.map +0 -1
- package/build/schema/parser.test.d.ts +0 -1
- package/build/schema/parser.test.js +0 -120
- package/build/schema/parser.test.js.map +0 -1
- package/build/schema/resolve-schema-lib.d.ts +0 -12
- package/build/schema/resolve-schema-lib.js +0 -11
- package/build/schema/resolve-schema-lib.js.map +0 -1
- package/build/schema/resolve-schema-lib.test.d.ts +0 -1
- package/build/schema/resolve-schema-lib.test.js +0 -17
- package/build/schema/resolve-schema-lib.test.js.map +0 -1
- package/build/schema/types.d.ts +0 -8
- package/build/schema/types.js +0 -2
- package/build/schema/types.js.map +0 -1
- package/build/stack-utils.d.ts +0 -25
- package/build/stack-utils.js +0 -95
- package/build/stack-utils.js.map +0 -1
- package/build/stack-utils.test.d.ts +0 -1
- package/build/stack-utils.test.js +0 -80
- package/build/stack-utils.test.js.map +0 -1
|
@@ -1,249 +0,0 @@
|
|
|
1
|
-
import { ProcedureError, ProcedureValidationError, ProcedureYieldValidationError } from '../../errors.js';
|
|
2
|
-
import type { TProcedureRegistration, TStreamProcedureRegistration } from '../../index.js';
|
|
3
|
-
import type { ErrorDoc } from '../types.js';
|
|
4
|
-
/** Either a regular or stream procedure registration — accepted by taxonomy callbacks. */
|
|
5
|
-
export type TAnyProcedureRegistration = TProcedureRegistration | TStreamProcedureRegistration;
|
|
6
|
-
/**
|
|
7
|
-
* An entry in an {@link ErrorTaxonomy}. Describes how to recognize a thrown
|
|
8
|
-
* error at runtime and how to serialize it into an HTTP response.
|
|
9
|
-
*
|
|
10
|
-
* Exactly one of `class` or `match` must be provided.
|
|
11
|
-
*/
|
|
12
|
-
export type ErrorTaxonomyEntry<TError = any, TBody = unknown> = {
|
|
13
|
-
/** `instanceof` discriminator. Mutually exclusive with `match`. */
|
|
14
|
-
class?: new (...args: any[]) => TError;
|
|
15
|
-
/** Predicate discriminator — for 3rd-party errors that can't subclass a framework type. */
|
|
16
|
-
match?: (err: unknown) => err is TError;
|
|
17
|
-
/** HTTP status code to send when this error is caught. */
|
|
18
|
-
statusCode: number;
|
|
19
|
-
/** One-line description used by DocRegistry to document the error in the envelope. */
|
|
20
|
-
description?: string;
|
|
21
|
-
/** Optional response-body JSON Schema — consumed by DocRegistry. */
|
|
22
|
-
schema?: Record<string, unknown>;
|
|
23
|
-
/**
|
|
24
|
-
* Maps the caught error to a response body. When omitted, the body is
|
|
25
|
-
* `{ name: <key>, message: err.message }` where `<key>` is this entry's key.
|
|
26
|
-
* When the returned object lacks a `name` field, one is auto-injected —
|
|
27
|
-
* wire-protocol consistency (needed by the client dispatcher) is guaranteed.
|
|
28
|
-
*/
|
|
29
|
-
toResponse?: (err: TError, meta: {
|
|
30
|
-
key: string;
|
|
31
|
-
}) => TBody;
|
|
32
|
-
/**
|
|
33
|
-
* Side effect on catch (logging, metrics). Awaited before the response is sent.
|
|
34
|
-
* `raw` is the framework-specific request context (Hono `Context` /
|
|
35
|
-
* `{ req, res }` for Express) — cast as needed.
|
|
36
|
-
*/
|
|
37
|
-
onCatch?: (err: TError, ctx: {
|
|
38
|
-
procedure: TAnyProcedureRegistration;
|
|
39
|
-
key: string;
|
|
40
|
-
raw: unknown;
|
|
41
|
-
}) => void | Promise<void>;
|
|
42
|
-
};
|
|
43
|
-
/**
|
|
44
|
-
* A named collection of {@link ErrorTaxonomyEntry} values. First match wins at
|
|
45
|
-
* resolution time. `defineErrorTaxonomy` topologically sorts class-based
|
|
46
|
-
* entries so a subclass is always checked before its ancestors regardless of
|
|
47
|
-
* declaration order; predicate entries retain declared order.
|
|
48
|
-
*/
|
|
49
|
-
export type ErrorTaxonomy = Record<string, ErrorTaxonomyEntry>;
|
|
50
|
-
/**
|
|
51
|
-
* Identity helper that preserves literal inference and:
|
|
52
|
-
* 1. validates each entry has exactly one discriminator (`class` xor `match`);
|
|
53
|
-
* 2. topologically sorts `class:` entries so subclasses precede base classes.
|
|
54
|
-
*
|
|
55
|
-
* The sort is stable — entries unrelated by inheritance keep their declared
|
|
56
|
-
* order. Predicate entries (with `match:`) always keep declared order relative
|
|
57
|
-
* to class entries, so a predicate that's intentionally narrower can be placed
|
|
58
|
-
* before a class entry to take precedence.
|
|
59
|
-
*/
|
|
60
|
-
export declare function defineErrorTaxonomy<T extends ErrorTaxonomy>(entries: T): T;
|
|
61
|
-
/**
|
|
62
|
-
* Default taxonomy covering framework error classes that can be thrown by a
|
|
63
|
-
* handler at request time. Layered after the user taxonomy during resolution.
|
|
64
|
-
*
|
|
65
|
-
* `ProcedureError` uses `match:` rather than `class:` so it matches only
|
|
66
|
-
* direct throws (e.g. from `ctx.error()`). When the core wraps a non-ProcedureError
|
|
67
|
-
* into a ProcedureError with `cause`, that wrapper falls through — the
|
|
68
|
-
* resolver unwraps the cause and the user taxonomy / `unknownError` sees the
|
|
69
|
-
* real thrown value.
|
|
70
|
-
*/
|
|
71
|
-
export declare const defaultErrorTaxonomy: {
|
|
72
|
-
ProcedureValidationError: {
|
|
73
|
-
class: typeof ProcedureValidationError;
|
|
74
|
-
statusCode: number;
|
|
75
|
-
description: string;
|
|
76
|
-
toResponse: (err: any) => {
|
|
77
|
-
name: "ProcedureValidationError";
|
|
78
|
-
procedureName: any;
|
|
79
|
-
message: any;
|
|
80
|
-
errors: any;
|
|
81
|
-
};
|
|
82
|
-
schema: {
|
|
83
|
-
type: string;
|
|
84
|
-
properties: {
|
|
85
|
-
name: {
|
|
86
|
-
type: string;
|
|
87
|
-
const: string;
|
|
88
|
-
};
|
|
89
|
-
procedureName: {
|
|
90
|
-
type: string;
|
|
91
|
-
};
|
|
92
|
-
message: {
|
|
93
|
-
type: string;
|
|
94
|
-
};
|
|
95
|
-
errors: {
|
|
96
|
-
type: string;
|
|
97
|
-
items: {
|
|
98
|
-
type: string;
|
|
99
|
-
properties: {
|
|
100
|
-
instancePath: {
|
|
101
|
-
type: string;
|
|
102
|
-
};
|
|
103
|
-
message: {
|
|
104
|
-
type: string;
|
|
105
|
-
};
|
|
106
|
-
};
|
|
107
|
-
};
|
|
108
|
-
};
|
|
109
|
-
};
|
|
110
|
-
required: string[];
|
|
111
|
-
};
|
|
112
|
-
};
|
|
113
|
-
ProcedureYieldValidationError: {
|
|
114
|
-
class: typeof ProcedureYieldValidationError;
|
|
115
|
-
statusCode: number;
|
|
116
|
-
description: string;
|
|
117
|
-
toResponse: (err: any) => {
|
|
118
|
-
name: "ProcedureYieldValidationError";
|
|
119
|
-
procedureName: any;
|
|
120
|
-
message: any;
|
|
121
|
-
errors: any;
|
|
122
|
-
};
|
|
123
|
-
schema: {
|
|
124
|
-
type: string;
|
|
125
|
-
properties: {
|
|
126
|
-
name: {
|
|
127
|
-
type: string;
|
|
128
|
-
const: string;
|
|
129
|
-
};
|
|
130
|
-
procedureName: {
|
|
131
|
-
type: string;
|
|
132
|
-
};
|
|
133
|
-
message: {
|
|
134
|
-
type: string;
|
|
135
|
-
};
|
|
136
|
-
errors: {
|
|
137
|
-
type: string;
|
|
138
|
-
items: {
|
|
139
|
-
type: string;
|
|
140
|
-
properties: {
|
|
141
|
-
instancePath: {
|
|
142
|
-
type: string;
|
|
143
|
-
};
|
|
144
|
-
message: {
|
|
145
|
-
type: string;
|
|
146
|
-
};
|
|
147
|
-
};
|
|
148
|
-
};
|
|
149
|
-
};
|
|
150
|
-
};
|
|
151
|
-
required: string[];
|
|
152
|
-
};
|
|
153
|
-
};
|
|
154
|
-
ProcedureError: {
|
|
155
|
-
match: (err: unknown) => err is ProcedureError;
|
|
156
|
-
statusCode: number;
|
|
157
|
-
description: string;
|
|
158
|
-
toResponse: (err: any) => {
|
|
159
|
-
name: "ProcedureError";
|
|
160
|
-
procedureName: any;
|
|
161
|
-
message: any;
|
|
162
|
-
meta: any;
|
|
163
|
-
};
|
|
164
|
-
schema: {
|
|
165
|
-
type: string;
|
|
166
|
-
properties: {
|
|
167
|
-
name: {
|
|
168
|
-
type: string;
|
|
169
|
-
const: string;
|
|
170
|
-
};
|
|
171
|
-
procedureName: {
|
|
172
|
-
type: string;
|
|
173
|
-
};
|
|
174
|
-
message: {
|
|
175
|
-
type: string;
|
|
176
|
-
};
|
|
177
|
-
meta: {
|
|
178
|
-
type: string;
|
|
179
|
-
};
|
|
180
|
-
};
|
|
181
|
-
required: string[];
|
|
182
|
-
};
|
|
183
|
-
};
|
|
184
|
-
};
|
|
185
|
-
/**
|
|
186
|
-
* Doc-only entry for `ProcedureRegistrationError`, which is thrown at
|
|
187
|
-
* procedure-definition time (never at request time) and therefore doesn't
|
|
188
|
-
* appear in the runtime taxonomy. Consumers still see it in the error catalog
|
|
189
|
-
* via `DocRegistry.defaultErrors()`.
|
|
190
|
-
*/
|
|
191
|
-
export declare const PROCEDURE_REGISTRATION_ERROR_DOC: ErrorDoc;
|
|
192
|
-
/**
|
|
193
|
-
* Converts a taxonomy into {@link ErrorDoc} objects suitable for a DocEnvelope.
|
|
194
|
-
*
|
|
195
|
-
* @internal Used by `DocRegistry` to merge taxonomy entries into the envelope.
|
|
196
|
-
* Consumers should pass their taxonomy directly to `new DocRegistry({ errors: taxonomy })`
|
|
197
|
-
* rather than calling this helper — the constructor handles the conversion.
|
|
198
|
-
*/
|
|
199
|
-
export declare function taxonomyToErrorDocs(taxonomy: ErrorTaxonomy): ErrorDoc[];
|
|
200
|
-
/**
|
|
201
|
-
* Configuration for the fallback "unknown" error handler — applied when no
|
|
202
|
-
* taxonomy entry (user or default) matches a thrown value.
|
|
203
|
-
*/
|
|
204
|
-
export type UnknownErrorConfig = {
|
|
205
|
-
/** HTTP status code. Defaults to 500. */
|
|
206
|
-
statusCode?: number;
|
|
207
|
-
/** Serializes the error into a response body. */
|
|
208
|
-
toResponse: (err: unknown) => unknown;
|
|
209
|
-
/** Awaited before the response is sent. */
|
|
210
|
-
onCatch?: (err: unknown, ctx: {
|
|
211
|
-
procedure: TAnyProcedureRegistration;
|
|
212
|
-
raw: unknown;
|
|
213
|
-
}) => void | Promise<void>;
|
|
214
|
-
};
|
|
215
|
-
/**
|
|
216
|
-
* Result of matching an error against a taxonomy chain. Consumers translate
|
|
217
|
-
* `{ statusCode, body }` into their framework's response primitive and must
|
|
218
|
-
* `await runOnCatch()` before sending.
|
|
219
|
-
*/
|
|
220
|
-
export type ResolvedErrorResponse = {
|
|
221
|
-
statusCode: number;
|
|
222
|
-
body: unknown;
|
|
223
|
-
runOnCatch: () => Promise<void>;
|
|
224
|
-
};
|
|
225
|
-
/**
|
|
226
|
-
* Matches a thrown value against the user taxonomy, then (if `includeDefaults`)
|
|
227
|
-
* the default taxonomy, then the `unknownError` config. Returns `null` when
|
|
228
|
-
* nothing matches — callers fall through to their builder's imperative
|
|
229
|
-
* `onError` callback and the hard default.
|
|
230
|
-
*
|
|
231
|
-
* The core wraps any non-ProcedureError thrown by a handler into a
|
|
232
|
-
* ProcedureError with `cause` set to the original. This resolver unwraps that:
|
|
233
|
-
* candidates are checked in the order `[cause, outer]` so a user taxonomy sees
|
|
234
|
-
* its own error classes rather than the wrapper. The default `ProcedureError`
|
|
235
|
-
* entry uses a `match:` predicate that excludes wrappers so they reach
|
|
236
|
-
* `unknownError` instead.
|
|
237
|
-
*
|
|
238
|
-
* Side effects (`onCatch`) are deferred into `runOnCatch` so the caller decides
|
|
239
|
-
* when to execute them relative to writing the response.
|
|
240
|
-
*/
|
|
241
|
-
export declare function resolveErrorResponse(params: {
|
|
242
|
-
err: unknown;
|
|
243
|
-
userTaxonomy?: ErrorTaxonomy;
|
|
244
|
-
/** Whether to apply {@link defaultErrorTaxonomy}. Defaults to `true`. */
|
|
245
|
-
includeDefaults?: boolean;
|
|
246
|
-
unknownError?: UnknownErrorConfig;
|
|
247
|
-
procedure: TAnyProcedureRegistration;
|
|
248
|
-
raw: unknown;
|
|
249
|
-
}): ResolvedErrorResponse | null;
|
|
@@ -1,252 +0,0 @@
|
|
|
1
|
-
import { ProcedureError, ProcedureValidationError, ProcedureYieldValidationError, } from '../../errors.js';
|
|
2
|
-
/**
|
|
3
|
-
* Identity helper that preserves literal inference and:
|
|
4
|
-
* 1. validates each entry has exactly one discriminator (`class` xor `match`);
|
|
5
|
-
* 2. topologically sorts `class:` entries so subclasses precede base classes.
|
|
6
|
-
*
|
|
7
|
-
* The sort is stable — entries unrelated by inheritance keep their declared
|
|
8
|
-
* order. Predicate entries (with `match:`) always keep declared order relative
|
|
9
|
-
* to class entries, so a predicate that's intentionally narrower can be placed
|
|
10
|
-
* before a class entry to take precedence.
|
|
11
|
-
*/
|
|
12
|
-
export function defineErrorTaxonomy(entries) {
|
|
13
|
-
const pairs = Object.entries(entries);
|
|
14
|
-
for (const [key, entry] of pairs) {
|
|
15
|
-
const hasClass = entry.class !== undefined;
|
|
16
|
-
const hasMatch = entry.match !== undefined;
|
|
17
|
-
if (hasClass === hasMatch) {
|
|
18
|
-
throw new Error(`Error taxonomy entry "${key}" must define exactly one of { class, match }.`);
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
// Stable sort: subclass-of-the-other → -1, other-subclass-of-this → 1, else 0.
|
|
22
|
-
pairs.sort(([, a], [, b]) => {
|
|
23
|
-
if (!a.class || !b.class)
|
|
24
|
-
return 0;
|
|
25
|
-
if (a.class === b.class)
|
|
26
|
-
return 0;
|
|
27
|
-
if (a.class.prototype instanceof b.class)
|
|
28
|
-
return -1;
|
|
29
|
-
if (b.class.prototype instanceof a.class)
|
|
30
|
-
return 1;
|
|
31
|
-
return 0;
|
|
32
|
-
});
|
|
33
|
-
return Object.fromEntries(pairs);
|
|
34
|
-
}
|
|
35
|
-
/**
|
|
36
|
-
* Default taxonomy covering framework error classes that can be thrown by a
|
|
37
|
-
* handler at request time. Layered after the user taxonomy during resolution.
|
|
38
|
-
*
|
|
39
|
-
* `ProcedureError` uses `match:` rather than `class:` so it matches only
|
|
40
|
-
* direct throws (e.g. from `ctx.error()`). When the core wraps a non-ProcedureError
|
|
41
|
-
* into a ProcedureError with `cause`, that wrapper falls through — the
|
|
42
|
-
* resolver unwraps the cause and the user taxonomy / `unknownError` sees the
|
|
43
|
-
* real thrown value.
|
|
44
|
-
*/
|
|
45
|
-
export const defaultErrorTaxonomy = defineErrorTaxonomy({
|
|
46
|
-
ProcedureValidationError: {
|
|
47
|
-
class: ProcedureValidationError,
|
|
48
|
-
statusCode: 400,
|
|
49
|
-
description: 'Schema validation failed for the procedure input parameters.',
|
|
50
|
-
toResponse: (err) => ({
|
|
51
|
-
name: 'ProcedureValidationError',
|
|
52
|
-
procedureName: err.procedureName,
|
|
53
|
-
message: err.message,
|
|
54
|
-
errors: err.errors,
|
|
55
|
-
}),
|
|
56
|
-
schema: {
|
|
57
|
-
type: 'object',
|
|
58
|
-
properties: {
|
|
59
|
-
name: { type: 'string', const: 'ProcedureValidationError' },
|
|
60
|
-
procedureName: { type: 'string' },
|
|
61
|
-
message: { type: 'string' },
|
|
62
|
-
errors: {
|
|
63
|
-
type: 'array',
|
|
64
|
-
items: {
|
|
65
|
-
type: 'object',
|
|
66
|
-
properties: {
|
|
67
|
-
instancePath: { type: 'string' },
|
|
68
|
-
message: { type: 'string' },
|
|
69
|
-
},
|
|
70
|
-
},
|
|
71
|
-
},
|
|
72
|
-
},
|
|
73
|
-
required: ['name', 'procedureName', 'message'],
|
|
74
|
-
},
|
|
75
|
-
},
|
|
76
|
-
ProcedureYieldValidationError: {
|
|
77
|
-
class: ProcedureYieldValidationError,
|
|
78
|
-
statusCode: 500,
|
|
79
|
-
description: 'Schema validation failed for a yielded value in a streaming procedure.',
|
|
80
|
-
toResponse: (err) => ({
|
|
81
|
-
name: 'ProcedureYieldValidationError',
|
|
82
|
-
procedureName: err.procedureName,
|
|
83
|
-
message: err.message,
|
|
84
|
-
errors: err.errors,
|
|
85
|
-
}),
|
|
86
|
-
schema: {
|
|
87
|
-
type: 'object',
|
|
88
|
-
properties: {
|
|
89
|
-
name: { type: 'string', const: 'ProcedureYieldValidationError' },
|
|
90
|
-
procedureName: { type: 'string' },
|
|
91
|
-
message: { type: 'string' },
|
|
92
|
-
errors: {
|
|
93
|
-
type: 'array',
|
|
94
|
-
items: {
|
|
95
|
-
type: 'object',
|
|
96
|
-
properties: {
|
|
97
|
-
instancePath: { type: 'string' },
|
|
98
|
-
message: { type: 'string' },
|
|
99
|
-
},
|
|
100
|
-
},
|
|
101
|
-
},
|
|
102
|
-
},
|
|
103
|
-
required: ['name', 'procedureName', 'message'],
|
|
104
|
-
},
|
|
105
|
-
},
|
|
106
|
-
ProcedureError: {
|
|
107
|
-
match: (err) => err instanceof ProcedureError && err.cause === undefined,
|
|
108
|
-
statusCode: 500,
|
|
109
|
-
description: 'An error thrown from within a procedure handler via ctx.error().',
|
|
110
|
-
toResponse: (err) => ({
|
|
111
|
-
name: 'ProcedureError',
|
|
112
|
-
procedureName: err.procedureName,
|
|
113
|
-
message: err.message,
|
|
114
|
-
meta: err.meta,
|
|
115
|
-
}),
|
|
116
|
-
schema: {
|
|
117
|
-
type: 'object',
|
|
118
|
-
properties: {
|
|
119
|
-
name: { type: 'string', const: 'ProcedureError' },
|
|
120
|
-
procedureName: { type: 'string' },
|
|
121
|
-
message: { type: 'string' },
|
|
122
|
-
meta: { type: 'object' },
|
|
123
|
-
},
|
|
124
|
-
required: ['name', 'procedureName', 'message'],
|
|
125
|
-
},
|
|
126
|
-
},
|
|
127
|
-
});
|
|
128
|
-
/**
|
|
129
|
-
* Doc-only entry for `ProcedureRegistrationError`, which is thrown at
|
|
130
|
-
* procedure-definition time (never at request time) and therefore doesn't
|
|
131
|
-
* appear in the runtime taxonomy. Consumers still see it in the error catalog
|
|
132
|
-
* via `DocRegistry.defaultErrors()`.
|
|
133
|
-
*/
|
|
134
|
-
export const PROCEDURE_REGISTRATION_ERROR_DOC = {
|
|
135
|
-
name: 'ProcedureRegistrationError',
|
|
136
|
-
statusCode: 500,
|
|
137
|
-
description: 'An invalid schema or configuration was detected at procedure registration time.',
|
|
138
|
-
schema: {
|
|
139
|
-
type: 'object',
|
|
140
|
-
properties: {
|
|
141
|
-
name: { type: 'string', const: 'ProcedureRegistrationError' },
|
|
142
|
-
procedureName: { type: 'string' },
|
|
143
|
-
message: { type: 'string' },
|
|
144
|
-
},
|
|
145
|
-
required: ['name', 'procedureName', 'message'],
|
|
146
|
-
},
|
|
147
|
-
};
|
|
148
|
-
/**
|
|
149
|
-
* Converts a taxonomy into {@link ErrorDoc} objects suitable for a DocEnvelope.
|
|
150
|
-
*
|
|
151
|
-
* @internal Used by `DocRegistry` to merge taxonomy entries into the envelope.
|
|
152
|
-
* Consumers should pass their taxonomy directly to `new DocRegistry({ errors: taxonomy })`
|
|
153
|
-
* rather than calling this helper — the constructor handles the conversion.
|
|
154
|
-
*/
|
|
155
|
-
export function taxonomyToErrorDocs(taxonomy) {
|
|
156
|
-
return Object.entries(taxonomy).map(([key, entry]) => ({
|
|
157
|
-
name: key,
|
|
158
|
-
statusCode: entry.statusCode,
|
|
159
|
-
description: entry.description ?? '',
|
|
160
|
-
schema: entry.schema,
|
|
161
|
-
}));
|
|
162
|
-
}
|
|
163
|
-
/**
|
|
164
|
-
* Injects `{ name: key }` when `rawBody` is an object without a `name` field.
|
|
165
|
-
* Guarantees wire-protocol consistency (client dispatchers discriminate on
|
|
166
|
-
* `body.name`) without forcing every `toResponse` to repeat it.
|
|
167
|
-
*/
|
|
168
|
-
function ensureName(rawBody, key) {
|
|
169
|
-
if (rawBody && typeof rawBody === 'object' && !('name' in rawBody)) {
|
|
170
|
-
return { name: key, ...rawBody };
|
|
171
|
-
}
|
|
172
|
-
return rawBody;
|
|
173
|
-
}
|
|
174
|
-
/**
|
|
175
|
-
* Matches a thrown value against the user taxonomy, then (if `includeDefaults`)
|
|
176
|
-
* the default taxonomy, then the `unknownError` config. Returns `null` when
|
|
177
|
-
* nothing matches — callers fall through to their builder's imperative
|
|
178
|
-
* `onError` callback and the hard default.
|
|
179
|
-
*
|
|
180
|
-
* The core wraps any non-ProcedureError thrown by a handler into a
|
|
181
|
-
* ProcedureError with `cause` set to the original. This resolver unwraps that:
|
|
182
|
-
* candidates are checked in the order `[cause, outer]` so a user taxonomy sees
|
|
183
|
-
* its own error classes rather than the wrapper. The default `ProcedureError`
|
|
184
|
-
* entry uses a `match:` predicate that excludes wrappers so they reach
|
|
185
|
-
* `unknownError` instead.
|
|
186
|
-
*
|
|
187
|
-
* Side effects (`onCatch`) are deferred into `runOnCatch` so the caller decides
|
|
188
|
-
* when to execute them relative to writing the response.
|
|
189
|
-
*/
|
|
190
|
-
export function resolveErrorResponse(params) {
|
|
191
|
-
const { err, userTaxonomy, includeDefaults = true, unknownError, procedure, raw, } = params;
|
|
192
|
-
const wrappedCause = err instanceof ProcedureError && err.cause !== undefined
|
|
193
|
-
? err.cause
|
|
194
|
-
: undefined;
|
|
195
|
-
// Most-specific candidate first so a matching user entry on `cause` wins over
|
|
196
|
-
// a matching entry on the outer wrapper.
|
|
197
|
-
const candidates = wrappedCause !== undefined ? [wrappedCause, err] : [err];
|
|
198
|
-
const tryMatch = (tax) => {
|
|
199
|
-
for (const [key, entry] of Object.entries(tax)) {
|
|
200
|
-
for (const candidate of candidates) {
|
|
201
|
-
const matched = entry.class
|
|
202
|
-
? candidate instanceof entry.class
|
|
203
|
-
: entry.match
|
|
204
|
-
? entry.match(candidate)
|
|
205
|
-
: false;
|
|
206
|
-
if (!matched)
|
|
207
|
-
continue;
|
|
208
|
-
const rawBody = entry.toResponse
|
|
209
|
-
? entry.toResponse(candidate, { key })
|
|
210
|
-
: {
|
|
211
|
-
name: key,
|
|
212
|
-
message: candidate instanceof Error ? candidate.message : String(candidate),
|
|
213
|
-
};
|
|
214
|
-
const body = ensureName(rawBody, key);
|
|
215
|
-
return {
|
|
216
|
-
statusCode: entry.statusCode,
|
|
217
|
-
body,
|
|
218
|
-
runOnCatch: async () => {
|
|
219
|
-
if (entry.onCatch) {
|
|
220
|
-
await entry.onCatch(candidate, { procedure, key, raw });
|
|
221
|
-
}
|
|
222
|
-
},
|
|
223
|
-
};
|
|
224
|
-
}
|
|
225
|
-
}
|
|
226
|
-
return null;
|
|
227
|
-
};
|
|
228
|
-
if (userTaxonomy) {
|
|
229
|
-
const hit = tryMatch(userTaxonomy);
|
|
230
|
-
if (hit)
|
|
231
|
-
return hit;
|
|
232
|
-
}
|
|
233
|
-
if (includeDefaults) {
|
|
234
|
-
const hit = tryMatch(defaultErrorTaxonomy);
|
|
235
|
-
if (hit)
|
|
236
|
-
return hit;
|
|
237
|
-
}
|
|
238
|
-
if (unknownError) {
|
|
239
|
-
const mostSpecific = candidates[0];
|
|
240
|
-
return {
|
|
241
|
-
statusCode: unknownError.statusCode ?? 500,
|
|
242
|
-
body: unknownError.toResponse(mostSpecific),
|
|
243
|
-
runOnCatch: async () => {
|
|
244
|
-
if (unknownError.onCatch) {
|
|
245
|
-
await unknownError.onCatch(mostSpecific, { procedure, raw });
|
|
246
|
-
}
|
|
247
|
-
},
|
|
248
|
-
};
|
|
249
|
-
}
|
|
250
|
-
return null;
|
|
251
|
-
}
|
|
252
|
-
//# sourceMappingURL=error-taxonomy.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"error-taxonomy.js","sourceRoot":"","sources":["../../../src/implementations/http/error-taxonomy.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,cAAc,EACd,wBAAwB,EACxB,6BAA6B,GAC9B,MAAM,iBAAiB,CAAA;AAkDxB;;;;;;;;;GASG;AACH,MAAM,UAAU,mBAAmB,CAA0B,OAAU;IACrE,MAAM,KAAK,GAAG,MAAM,CAAC,OAAO,CAAC,OAAO,CAAC,CAAA;IAErC,KAAK,MAAM,CAAC,GAAG,EAAE,KAAK,CAAC,IAAI,KAAK,EAAE,CAAC;QACjC,MAAM,QAAQ,GAAG,KAAK,CAAC,KAAK,KAAK,SAAS,CAAA;QAC1C,MAAM,QAAQ,GAAG,KAAK,CAAC,KAAK,KAAK,SAAS,CAAA;QAC1C,IAAI,QAAQ,KAAK,QAAQ,EAAE,CAAC;YAC1B,MAAM,IAAI,KAAK,CACb,yBAAyB,GAAG,gDAAgD,CAC7E,CAAA;QACH,CAAC;IACH,CAAC;IAED,+EAA+E;IAC/E,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,EAAE,EAAE;QAC1B,IAAI,CAAC,CAAC,CAAC,KAAK,IAAI,CAAC,CAAC,CAAC,KAA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