Skip to content

Commit

Permalink
Proxy along ErrorResponse status codes to ErrorResult
Browse files Browse the repository at this point in the history
  • Loading branch information
brophdawg11 committed Feb 16, 2024
1 parent 5bedc16 commit cbcd94b
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion packages/router/router.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4352,7 +4352,11 @@ async function convertHandlerResultToDataResult(
}

if (type === ResultType.error) {
return { type, error: result };
return {
type,
error: result,
statusCode: isRouteErrorResponse(result) ? result.status : undefined,
};
}

if (isDeferredData(result)) {
Expand Down

0 comments on commit cbcd94b

Please sign in to comment.