mirror of
https://github.com/status-im/status-web.git
synced 2026-08-29 05:11:14 +00:00
Co-authored-by: marcelines <marcio@status.im> Co-authored-by: Jakub Kotula <520927+jkbktl@users.noreply.github.com> Co-authored-by: Pavel <14926950+prichodko@users.noreply.github.com> Co-authored-by: Felicio Mununga <felicio@users.noreply.github.com>
31 lines
1006 B
Diff
31 lines
1006 B
Diff
diff --git a/dist/unstable-core-do-not-import/procedureBuilder.mjs b/dist/unstable-core-do-not-import/procedureBuilder.mjs
|
|
index dee2251696459f1e9abe8a05873a47e06dba0a1c..88ddde4d095b57461cf65f85c9ccceafff1ea2b5 100644
|
|
--- a/dist/unstable-core-do-not-import/procedureBuilder.mjs
|
|
+++ b/dist/unstable-core-do-not-import/procedureBuilder.mjs
|
|
@@ -162,9 +162,24 @@ async function callRecursive(index, _def, opts) {
|
|
});
|
|
return result;
|
|
} catch (cause) {
|
|
+ const error = getTRPCErrorFromUnknown(cause)
|
|
+
|
|
+ // todo?:
|
|
+ // opts.onError?.({
|
|
+ // ctx,
|
|
+ // error,
|
|
+ // input: rawInput,
|
|
+ // path: '',
|
|
+ // type: proc._def.type,
|
|
+ // });
|
|
+
|
|
+ if (error.code === 'INTERNAL_SERVER_ERROR') {
|
|
+ throw error.cause;
|
|
+ }
|
|
+
|
|
return {
|
|
ok: false,
|
|
- error: getTRPCErrorFromUnknown(cause),
|
|
+ error,
|
|
marker: middlewareMarker
|
|
};
|
|
}
|