Skip to content

Commit 1b5f701

Browse files
committed
Document wrapRemixHandleError
1 parent cb5a978 commit 1b5f701

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

packages/remix/src/utils/instrumentServer.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,12 @@ async function extractResponseError(response: Response): Promise<unknown> {
7272
}
7373

7474
/**
75+
* Sentry utility to be used in place of `handleError` function of Remix v2
76+
* Remix Docs: https://remix.run/docs/en/main/file-conventions/entry.server#handleerror
7577
*
78+
* Should be used in `entry.server` like:
79+
*
80+
* export const handleError = Sentry.wrapRemixHandleError
7681
*/
7782
export function wrapRemixHandleError(err: unknown, { request }: DataFunctionArgs): void {
7883
// We are skipping thrown responses here as they are either handled:

0 commit comments

Comments
 (0)