Skip to content

Commit b406877

Browse files
committed
Update JSDocs.
1 parent a715808 commit b406877

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

packages/remix/src/utils/errors.ts

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ import { normalizeRemixRequest } from './web-fetch';
2222
* @param err The error to capture.
2323
* @param name The name of the origin function.
2424
* @param request The request object.
25+
* @param isRemixV2 Whether the error is from Remix v2 or not. Default is `true`.
2526
*
2627
* @returns A promise that resolves when the exception is captured.
2728
*/
@@ -93,7 +94,13 @@ export async function captureRemixServerException(
9394
}
9495

9596
/**
97+
* Wraps the original `HandleDocumentRequestFunction` with error handling.
9698
*
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`.
97104
*/
98105
export function errorHandleDocumentRequestFunction(
99106
this: unknown,
@@ -128,7 +135,16 @@ export function errorHandleDocumentRequestFunction(
128135
}
129136

130137
/**
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.
131146
*
147+
* @returns The wrapped `DataFunction`.
132148
*/
133149
export async function errorHandleDataFunction(
134150
this: unknown,

0 commit comments

Comments
 (0)