brass-runtime 1.17.0 → 1.18.1
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/README.md +36 -3
- package/dist/agent/cli/main.cjs +31 -32
- package/dist/agent/cli/main.js +3 -4
- package/dist/agent/cli/main.mjs +3 -4
- package/dist/agent/index.cjs +4 -5
- package/dist/agent/index.d.ts +1 -1
- package/dist/agent/index.js +3 -4
- package/dist/agent/index.mjs +3 -4
- package/dist/{chunk-7X3K5RMS.js → chunk-22HZQG5F.js} +9 -11
- package/dist/{chunk-GLE2WY7Z.cjs → chunk-2JHJ4YHS.cjs} +417 -124
- package/dist/{chunk-Q2I37RP3.cjs → chunk-2OW6IFY2.cjs} +44 -323
- package/dist/{chunk-7ZPEZ57L.cjs → chunk-5LC7V2OZ.cjs} +18 -20
- package/dist/{chunk-AGR5B2BC.cjs → chunk-5RZ7YITF.cjs} +564 -12
- package/dist/{chunk-DNFJLJMW.mjs → chunk-6MLAZPBL.mjs} +48 -24
- package/dist/{chunk-EJ6BPYVR.mjs → chunk-6V2AWT4R.mjs} +1 -1
- package/dist/{chunk-3AYM6WPJ.js → chunk-7DU7IQHK.js} +20 -299
- package/dist/{chunk-SK7UZRNI.mjs → chunk-7GBJYOX7.mjs} +528 -23
- package/dist/chunk-7TKI527D.cjs +123 -0
- package/dist/{chunk-52OB2ROS.js → chunk-7VQLEN37.js} +2 -4
- package/dist/{chunk-KH4SYAOS.mjs → chunk-B5FKOLTB.mjs} +20 -299
- package/dist/{chunk-FHQGHPMO.mjs → chunk-BC6Q6BCO.mjs} +2 -4
- package/dist/{chunk-4P2HHGAX.mjs → chunk-COOW7BJX.mjs} +32 -11
- package/dist/{chunk-2HQTDLHF.mjs → chunk-EEN5OTCR.mjs} +555 -3
- package/dist/{chunk-KZJQ723N.cjs → chunk-EICAJDNX.cjs} +13 -15
- package/dist/chunk-ELIECDYN.cjs +33 -0
- package/dist/{chunk-GYM3LLGS.mjs → chunk-H626ZTDZ.mjs} +399 -106
- package/dist/{chunk-C3MDXTRZ.js → chunk-HCJ4S3YB.js} +48 -24
- package/dist/{chunk-7JIJOVCT.js → chunk-IPSMXUWA.js} +2 -4
- package/dist/{chunk-4ROBZFL6.cjs → chunk-J6DUHITE.cjs} +6 -8
- package/dist/{chunk-6RY2FFN4.mjs → chunk-JWIEMBE6.mjs} +9 -11
- package/dist/{chunk-PD4EJTQC.cjs → chunk-KNTJ7FQB.cjs} +5 -5
- package/dist/chunk-KTGDLBLD.mjs +123 -0
- package/dist/chunk-LSYQ3C2M.js +33 -0
- package/dist/{chunk-RKGKFN2A.js → chunk-OW5VHAOE.js} +1 -1
- package/dist/{chunk-EOC4UHBS.mjs → chunk-RBHNOKH4.mjs} +2 -2
- package/dist/{chunk-6IXXWIUM.js → chunk-S4HXADU4.js} +555 -3
- package/dist/{chunk-FH2X7BVP.js → chunk-TTSPIU3U.js} +399 -106
- package/dist/{chunk-5QC7LRZ3.js → chunk-UAKAF32U.js} +2 -2
- package/dist/{chunk-CZIVE6NT.cjs → chunk-UUMKZJRJ.cjs} +48 -24
- package/dist/{chunk-MBEJI5HF.mjs → chunk-WCBNXPN6.mjs} +2 -4
- package/dist/{chunk-52PPNNI4.cjs → chunk-WGE2FEZE.cjs} +2 -2
- package/dist/{chunk-WBGRHGBP.cjs → chunk-WI7GZF3B.cjs} +114 -93
- package/dist/chunk-WUDHOZIH.js +6234 -0
- package/dist/{chunk-F6XWZQY4.cjs → chunk-WVSZOPGQ.cjs} +583 -78
- package/dist/chunk-XPIMJQYS.cjs +6234 -0
- package/dist/{chunk-VWIPB6I5.js → chunk-YGR2IN4R.js} +528 -23
- package/dist/chunk-YM3EDNYD.js +123 -0
- package/dist/chunk-YWLLH27R.mjs +33 -0
- package/dist/{chunk-BKK77SBA.js → chunk-YZ5LQ32F.js} +32 -11
- package/dist/chunk-Z3ZZMQUZ.mjs +6234 -0
- package/dist/core/index.cjs +37 -9
- package/dist/core/index.d.ts +19 -152
- package/dist/core/index.js +86 -58
- package/dist/core/index.mjs +86 -58
- package/dist/defaultClient-Cid0JoUR.d.ts +1648 -0
- package/dist/{effect-DIUHZ9IN.d.ts → effect-DnGUuhw6.d.ts} +22 -1
- package/dist/http/index.cjs +206 -59
- package/dist/http/index.d.ts +55 -819
- package/dist/http/index.js +220 -73
- package/dist/http/index.mjs +220 -73
- package/dist/http/testing.cjs +31 -10
- package/dist/http/testing.d.ts +16 -5
- package/dist/http/testing.js +29 -8
- package/dist/http/testing.mjs +29 -8
- package/dist/index.cjs +116 -88
- package/dist/index.d.ts +9 -8
- package/dist/index.js +87 -59
- package/dist/index.mjs +87 -59
- package/dist/{schedule-CK3Ml_7p.d.ts → layer-D2LFcBVx.d.ts} +176 -2
- package/dist/observability/index.cjs +20 -7
- package/dist/observability/index.d.ts +32 -8
- package/dist/observability/index.js +19 -6
- package/dist/observability/index.mjs +19 -6
- package/dist/perf/cli.cjs +26 -28
- package/dist/perf/cli.js +11 -13
- package/dist/perf/cli.mjs +11 -13
- package/dist/perf/index.cjs +13 -15
- package/dist/perf/index.js +11 -13
- package/dist/perf/index.mjs +11 -13
- package/dist/schema/index.cjs +2 -2
- package/dist/schema/index.js +1 -1
- package/dist/schema/index.mjs +1 -1
- package/dist/{server-D6JZ15_e.d.ts → server-Bf1zNYZk.d.ts} +5 -5
- package/dist/{stream-B4oK9JFP.d.ts → stream-I7bkvF7a.d.ts} +1 -1
- package/dist/{tracer-Hwt1cl7h.d.ts → tracer-DF83nLn6.d.ts} +2 -2
- package/dist/{tracing-DqbTKGcf.d.ts → tracing-CWV4gT0u.d.ts} +1 -1
- package/docs/README.md +2 -0
- package/docs/ai/PUBLIC_API.md +28 -7
- package/docs/articles/brass-runtime-http-observability.md +467 -0
- package/docs/frameworks/angular.md +51 -0
- package/docs/frameworks/express.md +58 -0
- package/docs/frameworks/fastify.md +49 -0
- package/docs/frameworks/nestjs.md +53 -0
- package/docs/frameworks/nextjs.md +55 -0
- package/docs/frameworks/react.md +44 -0
- package/docs/frameworks/vanilla.md +56 -0
- package/docs/guides/layers.md +130 -0
- package/docs/http-recipes.md +31 -1
- package/docs/http.md +50 -1
- package/docs/observability.md +132 -0
- package/docs/performance-profiler.md +6 -2
- package/docs/recipes/layers.md +46 -2
- package/docs/recipes/testing.md +25 -0
- package/package.json +6 -2
- package/dist/chunk-3LOYJFRR.cjs +0 -300
- package/dist/chunk-3Y2RIUMM.js +0 -300
- package/dist/chunk-5EC274J5.cjs +0 -2874
- package/dist/chunk-5VRJNBLZ.mjs +0 -2874
- package/dist/chunk-62AZW6UT.cjs +0 -313
- package/dist/chunk-74ZTY6CP.js +0 -2871
- package/dist/chunk-7CMJS3QE.mjs +0 -2871
- package/dist/chunk-A2OM6NEH.mjs +0 -194
- package/dist/chunk-B33ICAKP.js +0 -313
- package/dist/chunk-JF5WGYJJ.cjs +0 -194
- package/dist/chunk-KN32XNTH.mjs +0 -313
- package/dist/chunk-KQLYONSE.cjs +0 -2871
- package/dist/chunk-L2SYFEBS.js +0 -194
- package/dist/chunk-MIIYDLGM.js +0 -2874
- package/dist/chunk-PWC3RBQE.mjs +0 -300
- package/dist/client-CZHU674n.d.ts +0 -820
package/dist/chunk-PWC3RBQE.mjs
DELETED
|
@@ -1,300 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
asyncFlatMap,
|
|
3
|
-
asyncSync
|
|
4
|
-
} from "./chunk-36I3M4UC.mjs";
|
|
5
|
-
|
|
6
|
-
// src/http/requestPolicy.ts
|
|
7
|
-
var hasOwn = (value, key) => Object.prototype.hasOwnProperty.call(value, key);
|
|
8
|
-
var isPolicyObject = (value) => typeof value === "object" && value !== null && !Array.isArray(value);
|
|
9
|
-
var defineHttpPolicyPresets = (presets) => presets;
|
|
10
|
-
var httpPolicy = Object.freeze({
|
|
11
|
-
preset: (preset, overrides = {}) => ({
|
|
12
|
-
preset,
|
|
13
|
-
...overrides
|
|
14
|
-
}),
|
|
15
|
-
lane: (lane, overrides = {}) => ({
|
|
16
|
-
preset: lane,
|
|
17
|
-
lane,
|
|
18
|
-
...overrides
|
|
19
|
-
}),
|
|
20
|
-
define: defineHttpPolicyPresets
|
|
21
|
-
});
|
|
22
|
-
var getHttpRequestPolicy = (req, options = {}) => {
|
|
23
|
-
const legacy = req;
|
|
24
|
-
const source = req.policy;
|
|
25
|
-
const sourcePolicy = resolvePolicySource(req, source, options.presets);
|
|
26
|
-
const policy = {
|
|
27
|
-
...legacy.lane !== void 0 ? { lane: legacy.lane } : {},
|
|
28
|
-
...legacy.dedupKey !== void 0 ? { dedupKey: legacy.dedupKey } : {},
|
|
29
|
-
...legacy.priority !== void 0 ? { priority: legacy.priority } : {},
|
|
30
|
-
...legacy.retry !== void 0 ? { retry: legacy.retry } : {},
|
|
31
|
-
...req.poolKey !== void 0 ? { poolKey: req.poolKey } : {},
|
|
32
|
-
...sourcePolicy
|
|
33
|
-
};
|
|
34
|
-
return policy;
|
|
35
|
-
};
|
|
36
|
-
var withHttpRequestPolicy = (req, patch) => {
|
|
37
|
-
const current = getHttpRequestPolicy(req);
|
|
38
|
-
const next = {
|
|
39
|
-
...req,
|
|
40
|
-
policy: {
|
|
41
|
-
...current,
|
|
42
|
-
...patch
|
|
43
|
-
}
|
|
44
|
-
};
|
|
45
|
-
if (hasOwn(patch, "poolKey")) {
|
|
46
|
-
next.poolKey = patch.poolKey;
|
|
47
|
-
}
|
|
48
|
-
if (hasOwn(patch, "lane")) {
|
|
49
|
-
next.lane = patch.lane;
|
|
50
|
-
}
|
|
51
|
-
if (hasOwn(patch, "dedupKey")) {
|
|
52
|
-
next.dedupKey = patch.dedupKey;
|
|
53
|
-
}
|
|
54
|
-
if (hasOwn(patch, "priority")) {
|
|
55
|
-
next.priority = patch.priority;
|
|
56
|
-
}
|
|
57
|
-
if (hasOwn(patch, "retry")) {
|
|
58
|
-
next.retry = patch.retry;
|
|
59
|
-
}
|
|
60
|
-
return next;
|
|
61
|
-
};
|
|
62
|
-
var resolveHttpRequestPolicyPresets = (req, presets) => {
|
|
63
|
-
const policy = getHttpRequestPolicy(req, { presets });
|
|
64
|
-
return withHttpRequestPolicy({ ...req, policy }, policy);
|
|
65
|
-
};
|
|
66
|
-
var withHttpPolicyPresets = (presets) => {
|
|
67
|
-
return (next) => (req) => asyncFlatMap(
|
|
68
|
-
asyncSync(() => resolveHttpRequestPolicyPresets(req, presets)),
|
|
69
|
-
(resolved) => next(resolved)
|
|
70
|
-
);
|
|
71
|
-
};
|
|
72
|
-
function resolvePolicySource(req, source, presets) {
|
|
73
|
-
if (typeof source === "string") {
|
|
74
|
-
return resolveNamedPolicy(req, source, {}, presets);
|
|
75
|
-
}
|
|
76
|
-
if (!isPolicyObject(source)) return {};
|
|
77
|
-
if (!source.preset) return source;
|
|
78
|
-
return resolveNamedPolicy(req, source.preset, source, presets);
|
|
79
|
-
}
|
|
80
|
-
function resolveNamedPolicy(req, presetName, overrides, presets) {
|
|
81
|
-
const named = presets?.[presetName];
|
|
82
|
-
const resolved = typeof named === "function" ? named(req, presetName) : named;
|
|
83
|
-
return {
|
|
84
|
-
lane: presetName,
|
|
85
|
-
...isPolicyObject(resolved) ? resolved : {},
|
|
86
|
-
...overrides,
|
|
87
|
-
preset: presetName
|
|
88
|
-
};
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
// src/http/errors.ts
|
|
92
|
-
var HTTP_ERROR_TAGS = /* @__PURE__ */ new Set([
|
|
93
|
-
"Abort",
|
|
94
|
-
"BadUrl",
|
|
95
|
-
"FetchError",
|
|
96
|
-
"Timeout",
|
|
97
|
-
"PoolRejected",
|
|
98
|
-
"PoolTimeout",
|
|
99
|
-
"PoolClosed",
|
|
100
|
-
"BatchSplitError"
|
|
101
|
-
]);
|
|
102
|
-
var RETRYABLE_STATUS = /* @__PURE__ */ new Set([408, 429, 500, 502, 503, 504]);
|
|
103
|
-
var TIMEOUT_CODES = /* @__PURE__ */ new Set([
|
|
104
|
-
"ECONNABORTED",
|
|
105
|
-
"ETIMEDOUT",
|
|
106
|
-
"ESOCKETTIMEDOUT",
|
|
107
|
-
"UND_ERR_CONNECT_TIMEOUT",
|
|
108
|
-
"UND_ERR_HEADERS_TIMEOUT",
|
|
109
|
-
"UND_ERR_BODY_TIMEOUT"
|
|
110
|
-
]);
|
|
111
|
-
var ABORT_CODES = /* @__PURE__ */ new Set(["ERR_CANCELED", "ABORT_ERR"]);
|
|
112
|
-
function isHttpError(error) {
|
|
113
|
-
return hasTag(error) && HTTP_ERROR_TAGS.has(error._tag);
|
|
114
|
-
}
|
|
115
|
-
function isValidationError(error) {
|
|
116
|
-
return hasTag(error) && error._tag === "ValidationError";
|
|
117
|
-
}
|
|
118
|
-
function isCircuitBreakerOpen(error) {
|
|
119
|
-
return hasTag(error) && error._tag === "CircuitBreakerOpen";
|
|
120
|
-
}
|
|
121
|
-
function isKnownHttpError(error) {
|
|
122
|
-
return isHttpError(error) || isValidationError(error) || isCircuitBreakerOpen(error);
|
|
123
|
-
}
|
|
124
|
-
function isAbortHttpError(error) {
|
|
125
|
-
return isHttpError(error) && error._tag === "Abort";
|
|
126
|
-
}
|
|
127
|
-
function isTimeoutHttpError(error) {
|
|
128
|
-
return isHttpError(error) && (error._tag === "Timeout" || error._tag === "PoolTimeout");
|
|
129
|
-
}
|
|
130
|
-
function isFetchHttpError(error) {
|
|
131
|
-
return isHttpError(error) && error._tag === "FetchError";
|
|
132
|
-
}
|
|
133
|
-
function httpErrorStatus(error) {
|
|
134
|
-
if (!isFetchHttpError(error)) return void 0;
|
|
135
|
-
return typeof error.status === "number" && Number.isFinite(error.status) ? error.status : void 0;
|
|
136
|
-
}
|
|
137
|
-
function isRetryableHttpStatus(status) {
|
|
138
|
-
return RETRYABLE_STATUS.has(status);
|
|
139
|
-
}
|
|
140
|
-
function isRetryableHttpError(error, options = {}) {
|
|
141
|
-
if (!isHttpError(error)) return false;
|
|
142
|
-
switch (error._tag) {
|
|
143
|
-
case "Timeout":
|
|
144
|
-
case "PoolTimeout":
|
|
145
|
-
return true;
|
|
146
|
-
case "FetchError": {
|
|
147
|
-
const status = httpErrorStatus(error);
|
|
148
|
-
if (status !== void 0) return (options.retryOnStatus ?? isRetryableHttpStatus)(status);
|
|
149
|
-
return true;
|
|
150
|
-
}
|
|
151
|
-
default:
|
|
152
|
-
return false;
|
|
153
|
-
}
|
|
154
|
-
}
|
|
155
|
-
function isExternalAbortError(error) {
|
|
156
|
-
if (typeof error !== "object" || error === null) return false;
|
|
157
|
-
const record = error;
|
|
158
|
-
return record.name === "AbortError" || ABORT_CODES.has(String(record.code ?? ""));
|
|
159
|
-
}
|
|
160
|
-
function isExternalTimeoutError(error) {
|
|
161
|
-
if (typeof error !== "object" || error === null) return false;
|
|
162
|
-
const record = error;
|
|
163
|
-
return record.name === "TimeoutError" || TIMEOUT_CODES.has(String(record.code ?? ""));
|
|
164
|
-
}
|
|
165
|
-
function toHttpError(error, options = {}) {
|
|
166
|
-
if (isHttpError(error)) return error;
|
|
167
|
-
if (options.signal?.aborted || isExternalAbortError(error)) {
|
|
168
|
-
return { _tag: "Abort" };
|
|
169
|
-
}
|
|
170
|
-
const status = externalStatus(error);
|
|
171
|
-
const statusText = externalStatusText(error);
|
|
172
|
-
const code = externalCode(error);
|
|
173
|
-
const message = resolveMessage(error, options.message);
|
|
174
|
-
if (isExternalTimeoutError(error)) {
|
|
175
|
-
return {
|
|
176
|
-
_tag: "Timeout",
|
|
177
|
-
timeoutMs: options.timeoutMs ?? 0,
|
|
178
|
-
phase: options.phase ?? "request",
|
|
179
|
-
message
|
|
180
|
-
};
|
|
181
|
-
}
|
|
182
|
-
return {
|
|
183
|
-
_tag: "FetchError",
|
|
184
|
-
message,
|
|
185
|
-
...code !== void 0 ? { code } : {},
|
|
186
|
-
...status !== void 0 ? { status } : {},
|
|
187
|
-
...statusText !== void 0 ? { statusText } : {},
|
|
188
|
-
...retryAfterMsFromExternal(error) !== void 0 ? { retryAfterMs: retryAfterMsFromExternal(error) } : {},
|
|
189
|
-
cause: error
|
|
190
|
-
};
|
|
191
|
-
}
|
|
192
|
-
function matchHttpError(error, handlers) {
|
|
193
|
-
if (isKnownHttpError(error)) {
|
|
194
|
-
const handler = handlers[error._tag];
|
|
195
|
-
if (handler) return handler(error);
|
|
196
|
-
}
|
|
197
|
-
return handlers.default?.(error);
|
|
198
|
-
}
|
|
199
|
-
function formatHttpError(error) {
|
|
200
|
-
if (isValidationError(error)) {
|
|
201
|
-
const phase = error.phase ? `${error.phase} ` : "";
|
|
202
|
-
return `${phase}validation failed: ${error.message}`;
|
|
203
|
-
}
|
|
204
|
-
if (isCircuitBreakerOpen(error)) {
|
|
205
|
-
return `Circuit breaker is open after ${error.failures} failure(s)`;
|
|
206
|
-
}
|
|
207
|
-
if (!isHttpError(error)) {
|
|
208
|
-
return error instanceof Error ? error.message : String(error);
|
|
209
|
-
}
|
|
210
|
-
switch (error._tag) {
|
|
211
|
-
case "Abort":
|
|
212
|
-
return "HTTP request aborted";
|
|
213
|
-
case "BadUrl":
|
|
214
|
-
case "PoolRejected":
|
|
215
|
-
case "PoolTimeout":
|
|
216
|
-
case "PoolClosed":
|
|
217
|
-
case "BatchSplitError":
|
|
218
|
-
return error.message;
|
|
219
|
-
case "FetchError":
|
|
220
|
-
return formatFetchError(error);
|
|
221
|
-
case "Timeout":
|
|
222
|
-
return error.message;
|
|
223
|
-
}
|
|
224
|
-
}
|
|
225
|
-
function hasTag(error) {
|
|
226
|
-
return typeof error === "object" && error !== null && typeof error._tag === "string";
|
|
227
|
-
}
|
|
228
|
-
function externalCode(error) {
|
|
229
|
-
if (typeof error !== "object" || error === null) return void 0;
|
|
230
|
-
const code = error.code;
|
|
231
|
-
return typeof code === "string" && code.length > 0 ? code : void 0;
|
|
232
|
-
}
|
|
233
|
-
function externalStatus(error) {
|
|
234
|
-
if (typeof error !== "object" || error === null) return void 0;
|
|
235
|
-
const record = error;
|
|
236
|
-
const response = typeof record.response === "object" && record.response !== null ? record.response : void 0;
|
|
237
|
-
const status = response?.status ?? record.status ?? record.statusCode;
|
|
238
|
-
return typeof status === "number" && Number.isFinite(status) ? status : void 0;
|
|
239
|
-
}
|
|
240
|
-
function externalStatusText(error) {
|
|
241
|
-
if (typeof error !== "object" || error === null) return void 0;
|
|
242
|
-
const record = error;
|
|
243
|
-
const response = typeof record.response === "object" && record.response !== null ? record.response : void 0;
|
|
244
|
-
const statusText = response?.statusText ?? record.statusText ?? record.statusMessage;
|
|
245
|
-
return typeof statusText === "string" && statusText.length > 0 ? statusText : void 0;
|
|
246
|
-
}
|
|
247
|
-
function retryAfterMsFromExternal(error) {
|
|
248
|
-
if (typeof error !== "object" || error === null) return void 0;
|
|
249
|
-
const record = error;
|
|
250
|
-
const response = typeof record.response === "object" && record.response !== null ? record.response : void 0;
|
|
251
|
-
const headers = response?.headers ?? record.headers;
|
|
252
|
-
if (typeof headers !== "object" || headers === null) return void 0;
|
|
253
|
-
const headerRecord = headers;
|
|
254
|
-
const raw = headerRecord["retry-after"] ?? headerRecord["Retry-After"];
|
|
255
|
-
if (raw === void 0 || raw === null) return void 0;
|
|
256
|
-
const seconds = Number(raw);
|
|
257
|
-
if (Number.isFinite(seconds)) return Math.max(0, Math.floor(seconds * 1e3));
|
|
258
|
-
const dateMs = Date.parse(String(raw));
|
|
259
|
-
return Number.isFinite(dateMs) ? Math.max(0, dateMs - Date.now()) : void 0;
|
|
260
|
-
}
|
|
261
|
-
function resolveMessage(error, message) {
|
|
262
|
-
if (typeof message === "function") return message(error);
|
|
263
|
-
if (typeof message === "string") return message;
|
|
264
|
-
if (error instanceof Error && error.message) return error.message;
|
|
265
|
-
if (typeof error === "object" && error !== null) {
|
|
266
|
-
const value = error.message;
|
|
267
|
-
if (typeof value === "string" && value.length > 0) return value;
|
|
268
|
-
}
|
|
269
|
-
return String(error);
|
|
270
|
-
}
|
|
271
|
-
function formatFetchError(error) {
|
|
272
|
-
const status = httpErrorStatus(error);
|
|
273
|
-
if (status === void 0) return error.message;
|
|
274
|
-
const statusText = error.statusText ? ` ${error.statusText}` : "";
|
|
275
|
-
return `HTTP ${status}${statusText}: ${error.message}`;
|
|
276
|
-
}
|
|
277
|
-
|
|
278
|
-
export {
|
|
279
|
-
defineHttpPolicyPresets,
|
|
280
|
-
httpPolicy,
|
|
281
|
-
getHttpRequestPolicy,
|
|
282
|
-
withHttpRequestPolicy,
|
|
283
|
-
resolveHttpRequestPolicyPresets,
|
|
284
|
-
withHttpPolicyPresets,
|
|
285
|
-
isHttpError,
|
|
286
|
-
isValidationError,
|
|
287
|
-
isCircuitBreakerOpen,
|
|
288
|
-
isKnownHttpError,
|
|
289
|
-
isAbortHttpError,
|
|
290
|
-
isTimeoutHttpError,
|
|
291
|
-
isFetchHttpError,
|
|
292
|
-
httpErrorStatus,
|
|
293
|
-
isRetryableHttpStatus,
|
|
294
|
-
isRetryableHttpError,
|
|
295
|
-
isExternalAbortError,
|
|
296
|
-
isExternalTimeoutError,
|
|
297
|
-
toHttpError,
|
|
298
|
-
matchHttpError,
|
|
299
|
-
formatHttpError
|
|
300
|
-
};
|