@domino-sdk/relay 1.0.0-next.13 → 1.0.0-next.14
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/dist/authoring.d.ts +12 -12
- package/dist/authoring.js +1 -1
- package/dist/browser.d.ts +80 -80
- package/dist/browser.js +4 -4
- package/dist/{chunk-EZWNGI5B.js → chunk-F5OCJE52.js} +2 -2
- package/dist/{chunk-WQ24ILGO.js → chunk-FWRP6YAQ.js} +7 -3
- package/dist/{chunk-KS33GOUL.js → chunk-HAOW4ERY.js} +2 -2
- package/dist/{chunk-M64XHC42.js → chunk-K4ANDR6G.js} +1 -1
- package/dist/{chunk-OA2KMQVZ.js → chunk-TLGCEVG5.js} +10 -0
- package/dist/{deployments-CNCP0JnD.d.ts → deployments-gbA8IZCK.d.ts} +106 -106
- package/dist/index.js +3 -3
- package/dist/react/index.d.ts +434 -600
- package/dist/react/index.js +1187 -807
- package/dist/schema.d.ts +1 -1
- package/dist/schema.js +3 -3
- package/dist/server/index.d.ts +1 -1
- package/dist/server/index.js +3 -3
- package/package.json +4 -2
|
@@ -265,6 +265,15 @@ var RelayError = class extends RequestError {
|
|
|
265
265
|
this.missing = details.missing ?? [];
|
|
266
266
|
}
|
|
267
267
|
};
|
|
268
|
+
function asRelayError(cause, fallback = "Request failed") {
|
|
269
|
+
if (isRelayError(cause)) {
|
|
270
|
+
return cause;
|
|
271
|
+
}
|
|
272
|
+
return new RelayError(
|
|
273
|
+
cause instanceof Error && cause.message ? cause.message : fallback,
|
|
274
|
+
{ kind: "client", cause }
|
|
275
|
+
);
|
|
276
|
+
}
|
|
268
277
|
function clientError(message, code, details = {}) {
|
|
269
278
|
return new RelayError(message, { ...details, kind: "client", code });
|
|
270
279
|
}
|
|
@@ -939,6 +948,7 @@ export {
|
|
|
939
948
|
RelayErrorCode,
|
|
940
949
|
isRelayError,
|
|
941
950
|
RelayError,
|
|
951
|
+
asRelayError,
|
|
942
952
|
clientError,
|
|
943
953
|
parseInput,
|
|
944
954
|
profileVisibilitySchema,
|