@@ -22,6 +22,7 @@ import { normalizeRemixRequest } from './web-fetch';
22
22
* @param err The error to capture.
23
23
* @param name The name of the origin function.
24
24
* @param request The request object.
25
+ * @param isRemixV2 Whether the error is from Remix v2 or not. Default is `true`.
25
26
*
26
27
* @returns A promise that resolves when the exception is captured.
27
28
*/
@@ -93,7 +94,13 @@ export async function captureRemixServerException(
93
94
}
94
95
95
96
/**
97
+ * Wraps the original `HandleDocumentRequestFunction` with error handling.
96
98
*
99
+ * @param origDocumentRequestFunction The original `HandleDocumentRequestFunction`.
100
+ * @param requestContext The request context.
101
+ * @param isRemixV2 Whether the Remix version is v2 or not.
102
+ *
103
+ * @returns The wrapped `HandleDocumentRequestFunction`.
97
104
*/
98
105
export function errorHandleDocumentRequestFunction (
99
106
this : unknown ,
@@ -128,7 +135,16 @@ export function errorHandleDocumentRequestFunction(
128
135
}
129
136
130
137
/**
138
+ * Wraps the original `DataFunction` with error handling.
139
+ * This function also stores the form data keys if the action is being called.
140
+ *
141
+ * @param origFn The original `DataFunction`.
142
+ * @param name The name of the function.
143
+ * @param args The arguments of the function.
144
+ * @param isRemixV2 Whether the Remix version is v2 or not.
145
+ * @param span The span to store the form data keys.
131
146
*
147
+ * @returns The wrapped `DataFunction`.
132
148
*/
133
149
export async function errorHandleDataFunction (
134
150
this : unknown ,
0 commit comments